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

Software Engineer

CRED
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I initially started my journey by learning basic programming languages. Later, I started giving contests on code forces and solving questions on it. I kept trying to be consistent in doing so. After 2-3 months I was able to solve some questions on code forces. Then in my third year, I studied core subjects like OS, DBMS, OOPS, and CN in depth. In this manner, I was well prepared before the placement season.
Application story
I got this opportunity through campus placements. CRED visited our campus for internships and placements. I applied through my resume on their portal.
Why selected/rejected for the role?
I was able to solve almost all the questions asked me during the selection process. I have done a lot of coding practise on Competitive programming sites and built a deep understanding of programming skills. My good communication skills are also one reason of my selection.
Preparation
Duration: 2 months
Topics: Data Structures and Algorithms, Operating System, Database Management System, Object-Oriented Programming System
Tip
Tip

Do lot of hard work and practice of Data Structures and Algorithms based questions. I personally recommend you Coding Ninjas and Geeks For Geeks for interview preparation.

Application process
Where: Campus
Eligibility: 6
Resume Tip
Resume tip

Make your resume short and try to make it of one page only and do mention all your skills which you are confident of in your resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration70 minutes
Interview date16 Mar 2022
Coding problem2

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
AmazonOptumAtlassian

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 substring and their frequency and append current substring to the decrypted string and after the end of traversal of given string our answer will be kth element of the decrypted string.

Try solving now
02
Round
Medium
Face to Face
Duration60 minutes
Interview date17 Mar 2021
Coding problem2

1. Positive Negative Pair

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

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 whether I should print all distinct x‘s or if I should print an x if a pair of +x and -x is encountered. The first approach I told was to use a map and I was keeping a flag for +x and -x if it’s 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 and for each element x , I would print x min(count[-x],count[+x]) times. He said he can’t afford that much space and he wanted me to optimise space further. So I told him a 2 pointer approach where I sort the array once and then keep two pointers to the start and end. I would move the start pointer forward if the sum is less than 0 and I’ll move the end pointer backward if the sum is greater than 0. He was fine with the solution and asked me to code it in a paper. I wrote the code and walked him through it.

Try solving now

2. Design Question

Design the logic for minimising cash flow in an app like ‘Splitwise’. (Practice)

Problem approach

Here the interviewer told me about an app called splitwise which i had used once. In the application each user adds the amount he spends and it’s shared equally among users of the app. The aim is to minimise the number of give and take operations. I initially thought of a very naive approach where I wanted to create classes for each person and expenditure and iterate through the expenditures of other people to find how much a person should give or take. When I took a closer look I got the idea of modelling it as a directed graph and adding directed edges for transactions. With the graph, I thought of taking the difference between the pair of edges between two people to reduce a give-and-take operation to a single give/take operation. There was a catch, if A has to give B Rs.10, B has to give C Rs.10, and A has to give C Rs.10, the minimum operation to do is to give Rs.20 from A to C. B is not involved here as he has to spend all he gets. So I said we could preprocess the graph with the numbers on the incoming and outgoing edges. If the total flow is 0, we could remove that node. He seemed convinced with the approach. He gave me a graph after all the preprocessing done and finally asked me how to minimize it.

03
Round
Medium
Face to Face
Duration45 minutes
Interview date17 Mar 2021
Coding problem2

The interviewer asked me some Com­puter Sci­ence‍ fundamentals in this round as well as some behavioural questions.

1. OS Questions

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

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 firstly told him the necessary conditions for deadlock and then explained to him that if we don’t let all conditions fulfilled for deadlock then it may 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 a child exists. I wrote the code for insertion and finding a word and walked him through.

2. Trie Implementation

Moderate
25m average time
65% success
0/80
Asked in companies
FlipkartAdobeHSBC

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.
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 the output of print(type("Python"))?

Choose another skill to practice
Similar interview experiences
company logo
SDE-3
3 rounds | 3 problems
Interviewed by CRED
2960 views
0 comments
0 upvotes
company logo
Developer Engineer
3 rounds | 3 problems
Interviewed by CRED
2733 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 4 problems
Interviewed by CRED
2766 views
1 comments
0 upvotes
company logo
Software Engineer
3 rounds | 3 problems
Interviewed by CRED
4465 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Mindtree
11969 views
7 comments
0 upvotes
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7686 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
9650 views
1 comments
0 upvotes