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

Software Developer

Incode
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
When I joined college, I was unaware of this Data Structure and Algorithm, which made my journey to getting an internship way more complicated. From that point, I started doing questions on different coding platforms.
Application story
I asked my senior for a referral for this post. After receiving the referral, I got an online assessment to complete.
Why selected/rejected for the role?
I was rejected despite having a good content preparation history and needing to practice more coding problems.
Preparation
Duration: 3 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

1) Master the Fundamentals: Ensure you have a strong foundation in computer science concepts such as data structures, algorithms, object-oriented programming, and system design. This forms the backbone of your technical skills.

2) Learn Multiple Programming Languages: While it's essential to be proficient in at least one programming language, familiarize yourself with multiple languages, as each has its strengths and use cases.

3) Build Projects: Practice by working on real-world projects. Building applications, websites, or contributing to open-source projects will help you apply your knowledge and gain valuable experience.

4) Stay Updated: The tech industry evolves rapidly. Keep yourself updated with the latest technologies, programming languages, frameworks, and tools.

5) Code Review and Collaboration: Participate in code reviews and collaborate with other developers. This helps you learn from others, improve your coding skills, and understand different perspectives.

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

1) Clear and Concise Format: Keep your resume clean, well-organized, and easy to read. Use a professional font, appropriate headings, and bullet points to present information clearly.

2) Tailor Your Resume: Customize your resume for each job application. Highlight relevant skills, experiences, and accomplishments that align with the specific job requirements.

3) Use Keywords: Many employers use applicant tracking systems (ATS) to screen resumes. Incorporate relevant keywords from the job description to increase the chances of your resume getting noticed.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date8 Jun 2023
Coding problem2

It was in the afternoon time around 2 pm

1. Tiling Problem

Hard
45m average time
0/120
Asked in companies
OptumOlaAdobe

You have been given a board where there are '2' rows and 'N' columns. You have an infinite supply of 2x1 tiles, and you can place a tile in the following ways:

1. Horizontally as 1x2 tile
2. Vertically as 2x1 tile

Count the number of ways to tile the given board using the available tiles.

Note :
The number of ways might be large so output your answer modulo 10^9 + 7.

Here an example of tile and board for 'N' = 4 :

Tiling Example

Problem approach

I have done this problem earlier so got the DP based approach during the test and this approach passed all the test cases.

Try solving now

2. Find K’th Character of Decrypted String

Moderate
33m average time
0/80
Asked in companies
OptumAtlassianAdobe

You have been given an Encrypted String where repetitions of substrings are represented as substring followed by the count of substrings.

Example: String "aabbbcdcdcd" will be encrypted as "a2b3cd3".

You need to find the 'K'th character of Decrypted String. Decrypted String would have 1-based indexing.

Note :

Input string will always be lowercase characters without any spaces.

If the count of a substring is 1 then also it will be followed by Integer '1'.
Example: "aabcdee" will be Encrypted as "a2bcd1e2"
This means it's guaranteed that each substring is followed by some Integer.

Also, the frequency of encrypted substring can be of more than one digit. For example, in "ab12c3", ab is repeated 12 times. No leading 0 is present in the frequency of substring.

The frequency of a repeated substring can also be in parts.
Example: "aaaabbbb" can also have "a2a2b3b1" as Encrypted String.
Problem approach

I simply decrypt the string by reading substrings and their frequencies, appending each current substring to the decrypted string, and after traversing the given string, our answer will be the kth element of the decrypted string.

Try solving now
02
Round
Medium
Video Call
Duration90 minutes
Interview date9 Jun 2023
Coding problem3

1. Positive Negative Pair

Easy
10m average time
90% success
0/40
Asked in companies
HSBCGrowwOptum

Given an array of distinct integers, find all the pairs having positive value and negative value of a number that exists in the array. Return the pairs in any order.

Note:
The pair consists of equal absolute values, one being positive and another negative.

Return an empty array, if no such pair exists.
Problem approach

I asked for some clarifications on whether I should print all distinct x's or if I should print an x when a pair of +x and -x is encountered. The first approach I suggested was to use a map, where I would keep a flag for +x and -x if they were found once. Later, he asked me to print all pairs, so I stored the frequencies of all the elements in the map and iterated through the negative elements. For each element x, I would print x a minimum of min(count[-x], count[+x]) times. He said he couldn’t afford that much space and wanted me to optimize the space further. So, I suggested a two-pointer approach where I sort the array once and then keep two pointers at the start and end. I would move the start pointer forward if the sum was less than 0 and move the end pointer backward if the sum was greater than 0. He was fine with the solution and asked me to code it on paper. I wrote the code and walked him through it.

Try solving now

2.

1. Difference between threads and processes.(Learn)
2. Deadlocks and their prevention.(Learn Deadlocks)(Learn Deadlock Prevention)

Problem approach

Tip 1: This is the most basic question of OS, and I explained it very well using a tabular representation. 

Tip 2: I first told him about the necessary conditions for deadlock and then explained to him that if we don’t let all conditions be fulfilled for deadlock, it can be prevented. 

Tip 3: I wrote a class to implement a character Trie using a vector of nodes as children. He asked me to improve on space, so I used a hashmap to store the child nodes only if necessary.

3. Trie Implementation

Moderate
25m average time
65% success
0/80
Asked in companies
MicrosoftMedia.netDunzo

Implement a Trie Data Structure which supports the following three operations:

Operation 1 - insert(word) - To insert a string WORD in the Trie.

Operation 2-  search(word) - To check if a string WORD is present in Trie or not.

Operation 3-  startsWith(word) - To check if there is a string that has the prefix WORD.


Trie is a data structure that is like a tree data structure in its organisation. It consists of nodes that store letters or alphabets of words, which can be added, retrieved, and deleted from the trie in a very efficient way.


In other words, Trie is an information retrieval data structure, which can beat naive data structures like Hashmap, Tree, etc in the time complexities of its operations.


The above figure is the representation of a Trie. New words that are added are inserted as the children of the root node. 

Alphabets are added in the top to bottom fashion in parent to children hierarchy. Alphabets that are highlighted with blue circles are the end nodes that mark the ending of a word in the Trie.


For Example:-
Type = ["insert", "search"], Query = ["coding", "coding].
We return ["null", "true"] as coding is present in the trie after 1st operation.
Problem approach

Trie is a data structure that is organized like a tree. It consists of nodes that store letters or alphabets of words, which can be added, retrieved, and deleted from the trie very efficiently.

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date9 Jun 2023
Coding problem2

1. Count All Subarrays With Given Sum

Moderate
15m average time
85% success
0/80
Asked in companies
SAP LabsIBMHSBC

You are given an integer array 'arr' of size 'N' and an integer 'K'.

Your task is to find the total number of subarrays of the given array whose sum of elements is equal to k.

A subarray is defined as a contiguous block of elements in the array.

Example:
Input: ‘N’ = 4, ‘arr’ = [3, 1, 2, 4], 'K' = 6

Output: 2

Explanation: The subarrays that sum up to '6' are: [3, 1, 2], and [2, 4].
Problem approach

Your task is to find the total number of subarrays of the given array whose sum of elements is equal to k.

Try solving now

2. Task Scheduler

Moderate
35m average time
65% success
0/80
Asked in companies
UberFacebookOracle

A ninja needs to complete ‘n’ tasks. Each task is represented by an uppercase letter of the English alphabet. Different letters are assigned to different tasks. A ninja can complete tasks in any order. He takes one unit of time to complete one task. For each unit of time, he could complete either one task or just be idle.

Ninja easily gets bored by doing the same task again. So he decided to keep at least ‘t’ units of time between any two same tasks.

You are given a string ‘tasks’ consisting of ‘n’ uppercase letters of the English alphabet, representing the tasks ninja need to complete, and an integer ‘t’ representing the least units of time between any two same tasks. Find out the minimum total units of time ninja will take to complete all ‘n’ tasks.

Problem approach

Create a frequency array `freq` to count the number of occurrences of each task.  
Sort the `freq` array in ascending order.  
Calculate the maximum frequency `maxFreq` of any task.  
Calculate the number of idle slots `idleSlots` required by the most frequent task, which is equal to `(maxFreq - 1) * n`.  
Iterate over the remaining tasks in descending order of frequency and subtract the minimum of `maxFreq` and the frequency of the task from `idleSlots`.  
If `idleSlots` is still positive, add it to the length of the input task list `tasks`. Otherwise, return `tasks.size()`.

Try solving now

Here's your problem of the day

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - 1
3 rounds | 6 problems
Interviewed by Incode
334 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Incode
323 views
0 comments
0 upvotes
SDE - 1
3 rounds | 5 problems
Interviewed by Incode
390 views
0 comments
0 upvotes
Software Engineer
2 rounds | 4 problems
Interviewed by Incode
360 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Developer
5 rounds | 14 problems
Interviewed by Microsoft
3932 views
1 comments
0 upvotes
company logo
Software Developer
6 rounds | 12 problems
Interviewed by SAP Labs
2806 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 3 problems
Interviewed by Amazon
1134 views
0 comments
0 upvotes