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

SDE - Intern

ShareChat
upvote
share-icon
2 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 Months
Topics: Dynamic Programming, Trees, Graph, Binary Search
Tip
Tip

Tip 1 : Do a good project
Tip 2 : Know CS fundamentals
Tip 3 : Should be good at coding the solution discussed

Application process
Where: Referral
Eligibility: No Criteria
Resume Tip
Resume tip

Tip 1 : Mention things are regarded in the Industry like GSOC, ICPC, etc.
Tip 2 : Should mention the projects

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date8 Sep 2019
Coding problem2

Typical DS/Algo question

1. Search In Rotated Sorted Array

Moderate
30m average time
65% success
0/80
Asked in companies
InformaticaDelhiveryGoldman Sachs

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array consisting of distinct integers and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4, 5] and if he rotates it by 2, then the array becomes: [4, 5, 1, 2, 3].

After rotating a sorted array, Aahad needs to answer Q queries asked by Harshit, each of them is described by one integer Q[i]. which Harshit wanted him to search in the array. For each query, if he found it, he had to shout the index of the number, otherwise, he had to shout -1.

For each query, you have to complete the given method where 'key' denotes Q[i]. If the key exists in the array, return the index of the 'key', otherwise, return -1.

Note:

Can you solve each query in O(logN) ?
Problem approach

I found the pivot using binary search at which array is rotated. 
Then performed two binary searches. First one in the left of pivot and second one in the right of pivot.

Try solving now

2. Time To Burn Tree

Hard
50m average time
50% success
0/120
Asked in companies
OLX GroupPhonePeMicrosoft

You have a binary tree of 'N' unique nodes and a Start node from where the tree will start to burn. Given that the Start node will always exist in the tree, your task is to print the time (in minutes) that it will take to burn the whole tree.


It is given that it takes 1 minute for the fire to travel from the burning node to its adjacent node and burn down the adjacent node.


For Example :
For the given binary tree: [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
Start Node: 3

    1
   / \
  2   3
     / \
    4   5

Output: 2

Explanation :
In the zeroth minute, Node 3 will start to burn.

After one minute, Nodes (1, 4, 5) that are adjacent to 3 will burn completely.

After two minutes, the only remaining Node 2 will be burnt and there will be no nodes remaining in the binary tree. 

So, the whole tree will burn in 2 minutes.
Problem approach

Try converting it to a graph and then appling BFS starting from the target element
Interviewer said not to use extra memory.
Then I used two DFS to answer the question. First DFS to reach the target and get answer uptill root. the second DFS to get answer from nodes computed in first DFS.

Try solving now
02
Round
Medium
Video Call
Duration60 Minutes
Interview date6 Oct 2019
Coding problem3

Timing was in the evening 5 to 6.
Interviewer was very nice and friendly.
Interview was more like a discussion.

1. Project based question

Asked me about one of my college project. It was an exam portal. Interviewer asked me about the database choice, schema design and backend tech used for the service.
He then asked to make changes to it support more scale.

2. Operating System Questions

Interviewer asked some basic questions on processes and threads.

3. DBMS Question

Interviewer asked me explain database transactions

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 - Intern
1 rounds | 3 problems
Interviewed by ShareChat
1694 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by ShareChat
1199 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 8 problems
Interviewed by ShareChat
1039 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by ShareChat
579 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15605 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15499 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes