MAQ Software Coding Questions and Answers
MAQ Software Coding Round Questions
MAQ Software Coding Questions and Answers asked in the Hiring Process of MAQ which is an Computer Based Online Recruitment Test.
Before you go through the test process, we would like to tell you some of the guidelines to attempt the test. Please note that the information on this page is solely based on the campus recruitment process. It may differ for off-campus or on -campus region to region.
About MAQ Software
MAQ Software is a group of software professionals who help Global 2000 firms speed data-driven changes. They speed up software efforts that help our customers revolutionise their businesses by utilising data analytics, cloud technologies, and data science.
They are dedicated to achieving client goals and growing our customer base. 90% of our consumers are regulars. For Fortune 500 firms, MAQ Software provides cutting-edge software solutions.
Their solutions make use of artificial intelligence (AI), cognitive services like Azure Machine Learning, the newest cloud computing trends like Microsoft Azure and Amazon Web Services, big data and advanced business intelligence features of SQL Server and Power BI, as well as the newest form factors like iOS and Android.
MAQ Software Eligibility Criteria
MAQ Software hired for two positions that is Associate Software Engineer and Software Engineer 1. We have tabulated the eligibility criteria below in the tabulated format for both the profiles.
MAQ Software | Associate Software Engineer | Software Engineer 1 |
---|---|---|
Batch | 2023 | 2023 |
Course |
|
|
Role | Associate Software Engineer | Software Engineer 1 |
Education |
|
|
Stipend/CTC: | 36k PM/ 7.5 LPA | 36k PM/ 7.5 LPA |
Work location | Noida/Hyderabad/Mumbai in office | Noida/Hyderabad/Mumbai in office |
Prime Course Trailer
Related Banners
Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription
Sample MAQ Software Coding Questions
Question 1 : Individual Character Count
Problem Statement :
You’re given a string where multiple characters are repeated consecutively. You’re supposed to reduce the size of this string using mathematical logic given as in the example below :
Input :
aabbbbeeeeffggg
Output:
a2b4e4f2g3
Input :
abbccccc
Output:
ab2c5
#include <bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); map < char, int > m; for (auto i: s) m[i]++; for (auto i: m) cout << i.first << i.second; }
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); int i, j, k = 0, count = 0; String uni = new String(""); for (i = 0; i < str.length(); i++) { count = 0; for (j = 0; j <= i; j++) { if (str.charAt(i) == str.charAt(j)) { count++; } } if (count == 1) { uni = uni + str.charAt(i); } } for (i = 0; i < uni.length(); i++) { count = 0; for (j = 0; j < str.length(); j++) { if (uni.charAt(i) == str.charAt(j)) { count++; } } if (count == 1) { System.out.printf("%c", uni.charAt(i)); } else { System.out.printf("%c%d", uni.charAt(i), count); } } } }
s = input() i = 1 c = 1 while i < len(s): if s[i] == s[i - 1]: c += 1 else: print(s[i - 1], end="") print(c, end="") c = 1 i += 1 print(s[i - 1], end="") print(c)
Question 2 : Set Bit
Problem Statement :
You are given an integer, N. You have to turn it into the binary representation of it, and find out how many set bits are there in the binary representation.
Input Format:
The first line contains the integer.
Output Format:
One line containing an integer denoting the number of setbits.
Constraints:
1<=N<=10^9
Sample Input:
8
Output:
1
Output Description:
8 in binary is 1000.
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin >> n; while (n) { n &= (n - 1); ans++; } cout << ans; }
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int count = 0; while (n != 0) { if ((n & 1) == 1) count++; n = n >> 1; } System.out.println(count); } }
n = int(input()) ans = 0 while n: n &= n - 1 ans += 1 print(ans)
Question 3 : Formatting large Products
Problem Statement: Rohan is weak in mathematics. He is giving mathematics Olympiad , but he got stuck in one of the question .Help rohan to solve the question.In Question there are two positive integer A and B. You have to find the product of all integer between A and B which is represented in the form C=D*10^E , where C is the product of numbers , D and E are non-negative integers and the last digit of D is non-zero.
Function Description
- Complete the function formatProducts in the editor below, formatProduct must return a string that represents C in the above described form.
- Function has the following parameters
- A: an integer
- B: an integer
Constraints
- A will between 1 and 1,000,000 . Inclusive.
- B will be between A and 1,000,000. Inclusive.
Sample Input 0
- 1
- 5
Sample Output 0
- 12 * 10^1
Explanation
- 1*2*3*4*5=120 = 12 * 10^1
Sample Input 1
- 3
- 10
Sample Output 1
- 18144 * 10^2
Explanation
- 3*4*….*10=1814400 =18144 * 10^2
import java.util.*; public class Main { public static String formatProducts (int a, int b) { int result = 1; for (int i = a; i <= b; i++) result = result * i; int temp = result; int power = 0; while ((result % 10) == 0) { power = power + 1; result = result / 10; } return result + " * 10^" + power; } public static void main (String[]args) { Scanner sc = new Scanner (System.in); int a = sc.nextInt (); int b = sc.nextInt (); System.out.println (formatProducts (a, b)); } }
def formatProducts(L,H): a=1 for i in range(L,H+1): a=a*i c=0 while(True): if a%10!=0: break else: c+=1 a=a//10 return (str(a)+" * 10^"+str(c)) L=int(input()) H=int(input()) print(formatProducts(L,H))
Question 4 : Copycat in exam (R->Medium)
Rahul copies in the exam from his adjacent students. But he doesn’t want to be caught, so he changes words keeping the letter constant. That means he interchanges the positions of letters in words. You are the examiner and you have to find if he has copied a certain word from the one adjacent student who is giving the same exam, and give Rahul the markings he deserves.
Note that: Uppercase and lowercase are the same.
Input Format:
First line with the adjacent student’s word
Second line with Rahul’s word
Output Format:
0 if not copied
1 if copied
Constraints:
1<=Length of string<=10^6
Sample Input:
CAR
ACR
Sample Output:
1
import java.util.*; public class Main { public static void main (String[]args) { Scanner sc = new Scanner (System.in); String s1 = sc.next (); String s2 = sc.next (); s1 = s1.toUpperCase (); s2 = s2.toUpperCase (); char arr1[] = s1.toCharArray (); Arrays.sort (arr1); char arr2[] = s2.toCharArray (); Arrays.sort (arr2); String res1 = new String (arr1); String res2 = new String (arr2); if (res1.equals (res2)) System.out.println ("1"); else System.out.println ("0"); } }
s=input() s1=input() s=s.lower() s=sorted(s) s1=s1.lower() s1=sorted(s1) if s1==s: print(1) else: print(0)
#include<bits/stdc++.h> using namespace std; int main() { string s2,s1; cin>>s1>>s2; transform(s1.begin(),s1.end(),s1.begin(),::tolower); transform(s2.begin(),s2.end(),s2.begin(),::tolower); sort(s1.begin(),s1.end()); sort(s2.begin(),s2.end()); cout<< (s2==s1); }
Question 4 : Minimum Occurrence (R->Medium)
Problem Statement :
Given a sting , return the character that appears the minimum number of times in the string. The string will contain only ascii characters, from the ranges (“a”-”z”,”A”-”Z”,0-9), and case matters . If there is a tie in the minimum number of times a character appears in the string return the character that appears first in the string.
Input Format:
Single line with no space denoting the input string.
Output Format:
Single character denoting the least frequent character.
Constraints:
Length of string <=10^6
Sample Input:
cdadcda
Sample Output:
c
Explanation:
C and A both are with minimum frequency. So c is the answer because it comes first with less index.
#include <bits/stdc++.h> using namespace std; unordered_map < char,int > F; int main() { string s; int m=INT_MAX; cin >> s; for(auto i:s) F[i]++; for(auto i:F) m=min(m,i.second); for(auto i:s) if(F[i]==m) { cout << i; break; } }
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); String str=sc.next(); char arr[]=str.toCharArray(); int temp[]=new int[256]; for(int i=0;i < arr.length;i++) { temp[arr[i]]++; } int min=Integer.MAX_VALUE; int index=0; for(int i=255;i >= 0;i--) { if(temp[i]==0) continue; min=Math.min(min,temp[i]); } for(int i=0;i < arr.length;i++) { if(min==temp[arr[i]]) { System.out.println(arr[i]); break; } } } }
s=input() ans=[] for i in s: ans.append(s.count(i)) print(s[ans.index(min(ans))])
FAQs on MAQ Coding Questions
Question 1: Is it hard to crack MAQ Interview Process?
Candidates who have appeared for MAQ Interview process claimed that Technical Interview of MAQ Software is bit Hard because they generally ask questions based on DSA, DBMS, OOPs concept, etc with other core subjects of Computer Science.
Question 2: What are steps involved in MAQ Software's recruitment process?
MAQ Software’s Recruitment Process mainly consists of 3 steps:
- Online Aptitude and Coding Assessment.
- Technical Interview
- HR Interview
Get over 200+ course One Subscription
Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others
Login/Signup to comment