Skip to content

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 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

Start Your Coding Journey Now!