MAQ Software Recruitment Preparation Guide
MAQ Software Recruitment Preparation Guide
● Content:
✅ Sample Questions:
● Find the longest palindromic substring in a given string.
● Sort 0 1 2
● Maximum Subarray Sum
● Detect and Remove Loop
● Count distinct substrings
● Nth Element Of Modified Fibonacci Series
● Permutations of a given string
● Non Repeating Character
● Spirally traversing a matrix
● Finding middle element in a linked list
● Queue using two Stacks
● Insertion Sort
● Detect a cycle in a linked list.
● SQL query: Retrieve top 3 salaries per department.
● Aptitude: Time, speed, distance, probability, puzzles.
✅ Sample Questions:
● Implement LRU Cache.
✅ Sample Questions:
● Design a URL shortening service (like bit.ly).
4. Managerial/HR Interview
✅ Sample Questions:
● Tell me about a challenging project you worked on.
📘 Preparation Tips
💻 Coding
● Practice DSA regularly on platforms like LeetCode, GeeksforGeeks, and HackerRank.
● Focus on arrays, strings, linked lists, trees, dynamic programming, and hash maps.
📚 Core CS Subjects
● DBMS: Normalization, indexing, SQL queries
🗣️ Communication
● Practice clear, concise explanations.
● Structure answers using the STAR method (Situation, Task, Action, Result).
📄 Resume
● Keep it one page, with strong emphasis on projects and internships.
You have been given two integers ‘X’ and ‘Y’ which are the first two integers of a series and an
integer ‘N’. You have to find the Nth number of the series using the Fibonacci rule given by f(x) = f(x -
1) + f(x - 2).
The answer may be very large, return it after modulus 10 ^ 9 + 7.
Note:
Given n number of rows containing data in this "cityname1 cityname2 distance" format and data is
redundant. You have to think about a data structure to store them efficiently.
1. Partition a string s in such a way that each of its substrings is a
palindrome. Return the minimal cuts required to split s into palindromes.
Example 1:
● Input: s = "aab"
● Output: 1
● Explanation: The palindrome partitioning ["aa","b"] could be produced using 1 cut.
Example 2:
● Input: s = "a"
● Output: 0
Example 3:
● Input: s = "ab"
● Output: 1
2. You are given an integer array digits as shown, where each digit of the
integers represented by an integer value. The digits are from most
significant to least significant in left-to-right order.
There are no leading 0's in the large integer. Increment it by one and return the array of
digits.
Example 1:
3. Given a sorted array of distinct integers, return the index if the target
value is found, or if not, the index where the value would be inserted in
order. An algorithm with O(log n) runtime must be written to handle it.
Example 1:
4. Return the median of the two sorted arrays given two arrays of size m
and n, nums1 and nums2, respectively. It is recommended that the run-time
complexity be O(log (m+n)).
Example 1:
Input: nums1 = [1,3], nums2 = [2]
Output: 2.00000
Explanation: merged array = [1,2,3] and median is 2.
Example 2:
6. Return the updated list after inverting the list's nodes k at a time, starting
with the linked list's head. Positive integer k must be less than or equal to
the linked list's length.
The remaining nodes should, in the end, remain how they are if the number of nodes is
not a multiple of k. Only the nodes themselves may be modified; the list's nodes' values
may not be changed.
Example 1:
Example 1:
● Input: height = [0,1,0,2,1,0,1,3,2,1,2,1]
● Output: 6
● Explanation: The above elevation map (black section) is represented by array
[0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being
trapped.
Example 2:
Example 1:
Example 1:
Example 1:
13. Rotate the array by k steps to the right, considering the array as
non-negative.
Example 1:
Example 2:
14. We want to sort the arrays nums in-place so that objects of the same
colour are adjacent, with the colours in order red, white, and blue.
To solve this problem, you must use the integers 0, 1, and 2 to represent the colours
red, white, and blue, respectively.
Example 1:
A binary search tree is employed to maintain sorted streams of data. For example, we
want to maintain the live data in sorted order of prices if we're getting online orders. We
would like to know how many items were purchased at a certain cost at any given time.
We would also like to know the maximum cost we are approaching. Using a
self-balancing binary search tree, we can implement a priority queue with extractMin()
or extractMax(). If we also support both extractMin() and extractMax(), we use a
Self-Balancing Binary Search Tree to do both operations O(Log n). A list of the smallest
elements on the right, the Smallest Greater Element on the right, and so on are all
examples of problems where a self-balancing BST is suitable.
Input:
https://www.glassdoor.co.in/Interview/MAQ-Software-Interview-Questions-E157056.htm
https://www.naukri.com/code360/interview-bundle/maq-software