Intuit interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Intuit
upvote
share-icon
2 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Algorithms, System Design, Java, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Medium
Face to Face
Duration60 minutes
Interview date18 May 2015
Coding problem5

The interviewer grilled me completely in Java.

1. Java Question

What is AtomicInteger class in Java?

Problem approach

The AtomicInteger class provides you with a int variable which can be read and written atomically, and which also contains advanced atomic operations like compareAndSet(). The AtomicInteger class is located in the java.util.concurrent.atomic package, so the full class name is java.util.concurrent.atomic.AtomicInteger. 
1. Creating an AtomicInteger is done like this:
AtomicInteger atomicInteger = new AtomicInteger();
This creates an AtomicInteger with the initial value 0.

2.Setting the value of an AtomicInteger instance via the set() method
AtomicInteger atomicInteger = new AtomicInteger(123);
atomicInteger.set(234);
This creates an AtomicInteger example with an initial value of 123, and then sets its value to 234 in the next line.

2. Java Question

Explain Collection Hierarchy in Java

Problem approach

The hierarchy of the entire collection framework consists of four core interfaces such as Collection, List, Set, Map, and two specialized interfaces named SortedSet and SortedMap for sorting. All the interfaces and classes for the collection framework are located in java.util package. 
Collection framework mainly consists of four interfaces:
1] List: It contains elements arranged in sequential order, and these elements can be accessed by using their index position (starting from 0). It implements ArrayList, Vector, and VectorList.
2] Queue: Queue contains similar elements in which new elements are added from one end, whereas removed from the other end (FIFO – First In First Out). It implements LinkedList and PriorityQueue.
3] Set: Set is used to store the collection of unique elements. Duplicacy is not allowed in the Set. It does not store the elements in sequential order. While accessing the elements, we may not get the elements in the same order in which they are stored. HashSet, LinkedHashSet, and TreeSet implements the Set interface.
4] Map: Map stores the elements in the form of Key/Value pairs. It is extended by SortedMap and implemented by HashMap and HashTable. It does not contain duplicate values, and each key can, at most, store one value.

3. Java Question

Internal functioning of hashmap in Java

Problem approach

1. HashMap uses its static inner class Node for storing map entries. That means each entry in hashMap is a Node. Internally HashMap uses a hashCode of the key Object and this hashCode is further used by the hash function to find the index of the bucket where the new entry can be added.
2. HashMap uses multiple buckets and each bucket points to a Singly Linked List where the entries (nodes) are stored. Once the bucket is identified by the hash function using hashcode, then hashCode is used to check if there is already a key with the same hashCode or not in the bucket(singly linked list).
3. If there already exists a key with the same hashCode, then the equals() method is used on the keys. If the equals method returns true, that means there is already a node with the same key and hence the value against that key is overwritten in the entry(node), otherwise, a new node is created and added to this Singly Linked List of that bucket.
If there is no key with the same hashCode in the bucket found by the hash function then the new Node is added into the bucket found.

4. Java Question

Fail fast and Fail Safe Iterator

Problem approach

The Fail Fast system is a system that shuts down immediately after an error is reported. All the operations will be aborted instantly in it. The Fail Fast iterators immediately throw ConcurrentModificationException in case of structural modification of the collection. Some examples of Fail Fast iterator are iterator on ArrayList, HashMap collection classes.
The Fail Safe is a system that continues to operate even after an error or fail has occurred. These systems do not abort the operations instantly; instead, they will try to hide the errors and will try to avoid failures as much as possible. A fail-safe iterator does not throw any exceptions unless it can handle if the collection is modified during the iteration process. This can be done because they operate on the copy of the collection object instead of the original object. The original collection will be kept structurally unchanged.

5. Java Question

Write different ways in which you can traverse over a map

Problem approach

Technique of traversing Maps:-
1) Iterating or looping map using Java5 foreach loop
Example: for (String key : loans.keySet()) { }

2) Iterating Map in Java using KeySet Iterator
Example: while (keySetIterator.hasNext()) { }

3) Looping HashMap in Java using EntrySet and Java 5 for loop
Example:for (Entry entry : entrySet) { }

4) Iterating HashMap in Java using EntrySet and Java iterator
Example: while (entrySetIterator.hasNext()) { }

02
Round
Medium
Face to Face
Duration60 minues
Interview date16 May 2015
Coding problem4

Questions based on data structures, OS and system design were asked in this round.

1. Median of two sorted arrays

Hard
25m average time
65% success
0/120
Asked in companies
GrabMicrosoftWells Fargo

Given two sorted arrays 'a' and 'b' of size 'n' and 'm' respectively.


Find the median of the two sorted arrays.


Median is defined as the middle value of a sorted list of numbers. In case the length of list is even, median is the average of the two middle elements.


The expected time complexity is O(min(logn, logm)), where 'n' and 'm' are the sizes of arrays 'a' and 'b', respectively, and the expected space complexity is O(1).


Example:
Input: 'a' = [2, 4, 6] and 'b' = [1, 3, 5]

Output: 3.5

Explanation: The array after merging 'a' and 'b' will be { 1, 2, 3, 4, 5, 6 }. Here two medians are 3 and 4. So the median will be the average of 3 and 4, which is 3.5.
Problem approach

The most basic approach is to merge both the sorted arrays using an auxiliary array. The median would be the middle element in the case of an odd-length array or the mean of both middle elements in the case of even length array.
The merging of two sorted arrays can be done in a way similar to merge sort. The time complexity of this approach would be O(n+m). 
A better solution is to use binary search. 
Steps :
1. Find the length of the smaller arrays of the two. Perform binary search on the smaller array.
2. Initialize two pointers - start = 0 and end = m (assuming m is the smaller length).
3. Run a while loop : while (start <= end) { ... }.
4. Calculate the partition index (partitionA) for a which is the mid-point of start and end i.e., (start + end) / 2.
5. Calculate the partition index (partitionB) for b which is (m + n + 1) / 2 - partitionA.
6. Find the maximum element in the left of a and b and minimum element in the right of a and b.
Now, we can have three cases -
(i) If (maxLeftA <= minRightB && maxLeftB <= minRightA), then return the median based on (m + n) is even or odd.
(ii) Else If (maxLeftA > minRightB), it means, we need to go on the left, so, set end = partitionA - 1.
(iii) Else, we need to go to the right, so, set start = partitionA + 1.

Try solving now

2. System Design Question

Design a bus seat booking design system.

Problem approach

Tip 1: Firstly, remember that the system design round is extremely open-ended and there’s no such thing as a standard answer. Even for the same question, you’ll have a totally different discussion with different interviewers.
Tip 2:Before you jump into the solution always clarify all the assumptions you’re making at the beginning of the interview. Ask questions to identify the scope of the system. This will clear the initial doubt, and you will get to know what are the specific detail interviewer wants to consider in this service.
Tip 3 : Design your structure and functions according to the requirements and try to convey your thoughts properly to the interviewer so that you do not mess up while implementing the idea .

3. OS Question

What is Fragmentation ?

Problem approach

When the processes are loaded and removed from the memory they create free space in the memory and these small blocks cannot be allocated to new upcoming processes and results in inefficient use of memory, it leads to an unwanted problem called fragmentation. Basically, there are two types of fragmentation:
Internal Fragmentation : In this fragmentation, the process is allocated a memory block of size more than the size of that process. Due to this some part of the memory is left unused and this cause internal fragmentation.
External Fragmentation : In this fragmentation, although we have total space available that is needed by a process still we are not able to put that process in the memory because that space is not contiguous.

4. OS Question

Memory Management in OS

Problem approach

At any time, many processes are competing for memory. Moreover, to increase performance, several processes are executed simultaneously. For this, we must keep several processes in the main memory, so it is important to manage them effectively.
The Memory management Techniques can be classified into following main categories:
Contiguous memory management schemes : Each program occupies a single contiguous block of storage locations, i.e., a set of memory locations with consecutive addresses.
Non-Contiguous memory management schemes : The program is divided into different blocks and loaded at different portions of the memory that need not necessarily be adjacent to one another.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Intuit
1230 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Intuit
1310 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Intuit
1451 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Intuit
162 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115096 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58237 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35146 views
7 comments
0 upvotes