# Tag Archives: MAQ Software

Given a partially filled 9×9 2D array ‘grid[9][9]’, the goal is to assign digits (from 1 to 9) to the empty cells so that everyâ€¦ Read More
Given that integers are read from a data stream. Find the median of elements read so for in an efficient way. For simplicity assume, thereâ€¦ Read More
Given a 2D array, print it in spiral form. Examples:  Input:  {{1,    2,   3,   4},              {5,â€¦ Read More
Given an unsorted array of size n. Array elements are in the range of 1 to n. One number from set {1, 2, …n} isâ€¦ Read More
We have discussed Knightâ€™s tour and Rat in a Maze problem in Set 1 and Set 2 respectively. Let us discuss N Queen as anotherâ€¦ Read More
Given a text txt[0..N-1] and a pattern pat[0..M-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You mayâ€¦ Read More
Naive Algorithm: i) It is the simplest method which uses brute force approach.  ii) It is a straight forward approach of solving the problem. iii)â€¦ Read More
The Fibonacci numbers are the numbers in the following integer sequence.0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …….. Inâ€¦ Read More
Given an array A[] consisting of only 0s, 1s, and 2s. The task is to write a function that sorts the given array. The functionsâ€¦ Read More
Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such asâ€¦ Read More
Given a string, the task is to reverse the order of the words in the given string.  Examples: Input: s = “geeks quiz practice code” Output:â€¦ Read More
The problem is opposite of this post. We are given a stack data structure with push and pop operations, the task is to implement aâ€¦ Read More
Given an array of integers arr[] of size N and an integer, the task is to rotate the array elements to the left by dâ€¦ Read More
Given an array (or string), the task is to reverse the array/string.Examples :   Input : arr[] = {1, 2, 3} Output : arr[] =â€¦ Read More
There are two singly linked lists in a system. By some programming error, the end node of one of the linked lists got linked toâ€¦ Read More