Intuit Coding Questions
Intuit Coding Questions With Answers
Intuit Coding Questions, which involves a computer-based online recruitment test, includes questions and answers on Intuit coding.
We would like to give you some instructions on how to attempt the test before you start the process. Please be aware that the data on this page only pertains to the campus hiring procedure. It may vary from area to region for on-campus or off-campus activities.
About Intuit Company
What makes Intuit a great place to work?
The right combination of a Meaningful Mission, Innovation & Technology, and a Great Place to Work culture.
What They Do?
At Intuit, it’s everyone’s job to innovate. They work in intuitive web, mobile and cloud solutions that enable 100 million consumers around the world to take charge of their money and do what they love.
Intuit Company Eligibility Criteria
Intuit Company hired for two positions that is SWE Intern/ SWE NCG. We have tabulated the eligibility criteria below in the tabulated format for both the profiles.
Intuit Company | SWE Intern/ SWE NCG |
---|---|
Batch | 2023 |
Course | CSE/IT/Software Engineering, Mathematics and Computing, ECE, EEE |
Role | SWE Intern/ SWE NCG |
Education |
|
Co- Op Internship Stipend | INR 80,000/- per month |
NCG CTC | CTC of 41,54,000/- INR |
Co- Op Internship Duration | 6 months |
Re-Location | Yes, for first 30 nights (For relocation eligible candidates) |
Intuit Company Selection Criteria
- Coding Challenge – The online test will have 4 coding questions that the candidates will have to solve in 90 minutes.
- Technical Assessment
- Values Fit
- Research and summer work experience
- Leadership positions in group activities
Prime Course Trailer
Related Banners
Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription
Sample Intuit Coding Questions With Solutions
Question 1 : Move Hash to Front
Problem Statement :
You have write a function that accepts, a string which length is “len”, the string has some “#”, in it you have to move all the hashes to the front of the string and return the whole string back and print it.
char* moveHash(char str[],int n);
Example :
Sample Test Case
Input :
Move#Hash#to#Front
Output :
###MoveHashtoFront
#include <bits/stdc++.h> using namespace std; string moveHash(string s) { string ans = ""; for (auto i: s) if (i == '#') ans = '#' + ans; else ans += i; return ans; } int main() { string s; getline(cin, s); cout << moveHash(s); }
import java.util.*; public class Main { public static void moveHash(String str, int n) { String str1 = new String(""); String str2 = new String(""); int i = 0; for (i = 0; i < n; i++) { if (str.charAt(i) == '#') str1 = str1 + str.charAt(i); else str2 = str2 + str.charAt(i); } String result = str1.concat(str2); System.out.println(result); } public static void main(String args[]) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); int len = a.length(); moveHash(a, len); } }
def moveHash(s): x = s.count("#") s = s.replace("#", "") return "#" * x + s s = input() print(moveHash(s))
Question 2 : Coloured Zenga
Problem Statement :
Rahul is playing a game, wherein he has multiple coloured wooden blocks, stacked one above the other, his task is to remove all the wooden blocks from the stack, without letting it fall and in the minimum number of steps. He can remove one block of a colour at a time, but he can remove multiple blocks of the same colour together. Determine the minimum number of steps in which he can perform this task.
For example, if you remove [red,red] from (white,red,red,white), the resulting array is [white,white].
Note- there are only two colour blocks – red and white
Function description :
Complete the minMoves function in the provided editor. It contains the following parameters:
Parameters:
Name | Type | Description |
---|---|---|
N | Integer | No. of Wooden blocks |
Array[ ] | Integer Array | Array of Blocks. |
Input format :
The first line contains an integer n denoting the number of blocks. Each n line denotes the colour of the wooden block .
Constraints :
1<=n<=700
0<=a[i]<=1
Sample input 1 :
4
red
white
white
red
Sample Output 2 :
2
Explanation :
Remove [white,white] first The array will be [red,red] The remaining numbers can be removed in one strap .
Sample Input 1:
4
white
red
white
red
Sample Output 1:
3
Sample Explanation:
0
The steps are [white,red,white,red]->[red,white,red]->[red,red]->[]. Therefore the answer is 3.
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector < string > arr(n); for (int i = 0; i < n; i++) cin >> arr[i]; int a = 0, b = 0; bool start = false; for (int i = 0; i < n; i++) { if (arr[i] == "white") { if (!start) { start = true; } } else { if (start) { a++; start = false; } } } if (start) a++; start = false; for (int i = 0; i < n; i++) { if (arr[i] == "red") { if (!start) { start = true; } } else { if (start) { b++; start = false; } } if (start) b++; } cout << min(a + 1, b + 1) << endl; return 0; }
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String arr[] = new String[n]; for (int i = 0; i < n; i++) arr[i] = sc.next(); int a = 0, b = 0; boolean flag = false; for (int i = 0; i < n; i++) { if (arr[i].equals("white")) { if (!flag) flag = true; } else { if (flag) { a++; flag = false; } } } if (flag) a++; flag = false; for (int i = 0; i < n; i++) { if (arr[i].equals("red")) { if (!flag) flag = true; } else { if (flag) { b++; flag = false; } } if (flag) b++; } System.out.println(Math.min(a + 1, b + 1)); } }
n = int(input()) arr = [] for i in range(n): arr.append(input()) a, b = 0, 0 start = False for i in range(n): if arr[i] == "white": if not start: start = True else: if start: a += 1 start = False if start: a += 1 start = False for i in range(n): if arr[i] == "red": if not start: start = True else: if start: b += 1 start = False if start: b += 1 print(min(a + 1, b + 1))
Question 3 : Copycat in exam
Problem Statement: 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
#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); }
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)
Question 4 : Order check
Problem Statement: In an IT company there are n number of Employees , they are asked to stand in ascending order according to their heights.But some employees are not currently standing in their correct position.
Your task is to find how many employees are there who are not standing in their correct positions.
Example
height=[1,2,1,3,3,4,3]
The 4 employees at indices 1,2,5 and 6 are not in the right positions. The correct positions are (1,1,2,3,3,3,4).Return 4.
Function Description
Complete the function countEmployees in the editor below.
count Employee has the following parameter(s):
int height[n]:an array of heights in the order the employees are standing
Returns:
Int : the number of employees not standing in the correct positions
Constraints
- 1<=n<=10^5
- 1<=height[i]<=10^9
Sample case 0
Sample input 0
7 ->height[] size n=7
1
2
1
3
3
4
3
Sample output 0:
4
Explanation
The four employees who are not standing in the correct positions are at indices [1,2,5,6] return 4. The correct positions are [1,1,2,3,3,3,4].
import java.util.*; public class Main { public static int countEmployees (int arr[]) { int n = arr.length; int temp[] = new int[n]; for (int i = 0; i < n; i++) temp[i] = arr[i]; Arrays.sort (arr); int count = 0; for (int i = 0; i < n; i++) if (arr[i] != temp[i]) count++; return count; } public static void main (String[]args) { Scanner sc = new Scanner (System.in); int n = sc.nextInt (); int arr[] = new int[n]; for (int i = 0; i < n; i++) arr[i] = sc.nextInt (); System.out.println (countEmployees (arr)); } }
def countEmployees(n,arr): dup_arr=arr[:] dup_arr.sort() count=0 for i in range(n): if arr[i]!=dup_arr[i]: count+=1 else: pass return count n=int(input()) arr=[ ] for i in range(n): arr.append(int(input())) print(countEmployees(n,arr))
Question 5 : Network Stream
Problem Statement :
A stream of n data packets arrives at a server. This server can only process packets that are exactly 2^n units long for some non-negative integer value of n (0<=n).
All packets are repackaged in order to the 1 largest possible value of 2^n units. The remaining portion of the packet is added to the next arriving packet before it is repackaged. Find the size of the largest repackaged packet in the given stream.
Example arriving Packets = [12, 25, 10, 7, 8]
The first packet has 12 units. The maximum value of 2^n that can be made has 2^n = 2^3 = 8 units because the next size up is 2^n = 2^4 = 16 (16 is greater than 12).
12 – 8 = 4 units are added to the next packet. There are 4 + 25 = 29 units to repackage, 2^n = 2^4 = 16 is the new size leaving 9 units (29-16 = 9)
Next packet is 9 + 10 = 29 unists & the maximum units(in 2^n) is 16 leaving 3 units.
3 + 7 = 10 , the max units is 8 Leaving 2 units, and so on.
The maximum repackaged size is 16 units.
Returns:
Long : the size of the largest packet that is streamed
Constraints :
1<=n<=10^5
1<=arriving Packets[i] size<=10^9
Sample case 0 :
Sample input 0:
5 → number of packets=5
13→ size of packets=[13,25,12,2,8]
25
10
2
8
Sample output 0:
16
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int arr[] = new int[n]; for (int i = 0; i < n; i++) arr[i] = sc.nextInt(); int temp = 1, max = Integer.MIN_VALUE; for (int i = 0; i < n - 1; i++) { temp = 1; while (2 * temp <= arr[i]) temp = temp * 2; max = Math.max(temp, max); arr[i + 1] += arr[i] - temp; } temp = 1; while (2 * temp <= arr[n - 1]) temp = temp * 2; max = Math.max(temp, max); System.out.println(max); } }
def largeRepackagedPacket(arr): twoP = [int(2**i) for i in range(31)] x = 0 ans = 0 for i in arr: i = i + x for j in range(31): if i < twoP[j]: break x = i - twoP[j - 1] if ans <= twoP[j - 1]: ans = twoP[j - 1] return ans Packets = [] for i in range(int(input())): Packets.append(int(input())) print(largeRepackagedPacket(Packets))
FAQs on Intuit Coding Questions
Question 1: What are the main topics covered in Coding Assessment and Technical Interview of Intuit?
They frequently ask questions on DSA, DBMS, OOPs, and other necessary Computer Science concepts.
Question 2: For what work Intuit is known?
Financial management, marketing, and compliance products and services are provided by Intuit Inc. In other words they provide Financial Software and Assistance to their customers to manage their financial deeds.
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