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

SDE - 1

ShareChat
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Algorithms, OOPs, DBMS, SQL, Web Development
Tip
Tip

Tip 1 : Do not rush into things. Learning takes time. Focus should be on the concepts and not just on leaving topics half-prepared. Devote 70% of both time and effort to DSA. I solved a total of around 500 questions on sites like GFG and Leetcode. Do not repeat similar questions just to increase the count of the number of questions

Tip 2 : Competitive Programming is a bonus and not a necessity, rather focus on core DSA based problems before trying CP. Do not pursue CP if you do not like it. Devote that extra time to core CS subjects and aptitude preparation.

Tip 3 : Projects play an important role too, do no ignore them. Try to get your hands dirty with a little bit of every field i.e., frontend, backend, and database.

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

Tip 1 : Try to make a single-page resume. Highlight skills, projects, and work experience more than CGPA. Ensure proper spacing and font to maintain professionalism.

Tip 2 : Does not lie on a resume. Everything written on your resume must be known by you in and out.

Interview rounds

01
Round
Easy
Video Call
Duration45 minutes
Interview date4 Aug 2022
Coding problem2

1. PostFix To Prefix

Easy
20m average time
70% success
0/40
Asked in companies
ShareChatSAP Labs

You are given a string denoting a valid Postfix expression containing ‘+’, ’-’, ’*’, ‘/’ and lowercase letters.


Convert the given Postfix expression into a Prefix expression.


Note:
Postfix notation is a method of writing mathematical expressions in which operators are placed after the operands. For example, "a b +" represents the addition of a and b.

Prefix notation is a method of writing mathematical expressions in which operators are placed before the operands. For example, "+ a b" represents the addition of a and b.

Expression contains lowercase English letters, ‘+’, ‘-’, ‘*’, and  ‘/’. 


Example:
Input: abc*+

Output: +a*bc

Explanation:
For the given postfix expression, infix expression is a+b*c. And it's corresponding prefix expression is +a*bc.


Problem approach

Ninja has been given a Postfix expression and he needs your help in converting it to Prefix expression.
Postfix expression is an expression where the operator appears in the expression after the operands. Simply of the form (operand1 operand2 operator)
Prefix expression is an expression where the operator appears in the expression before the operands. Simply of the form (operator operand1 operand2)

Try solving now

2. Saving Money

Moderate
20m average time
80% success
0/80
Asked in companies
FacebookAmazonShareChat

Ninja likes to travel a lot, but at the same time, he wants to save as much money as possible.


There are ‘N’ Stations connected by ‘M’ Trains. Each train that he boards starts from station ‘A’ and reaches destination station ‘B’ with a ticket price ‘P’.


Your task is to return the cheapest price from the given ‘source’ to ‘destination’ with up to ‘K’ stops. If there is no such route, return ‘-1’.


For example:
Input:
5 6
0 1 10
0 2 10
0 3 40
1 4 10
2 4 20
4 3 5
0 3 40 

There are three ways to reach station ‘3’ from station ‘0’. The first path is 0->1->4->3, which will cost us 10+ 10+ 5= 25 and the second path 0->2->4->3 will cost us, 10+ 20+ 5 = 35, and the third path 0->3 will cost us 40. 

We can’t take the first path since K = 1 and in this path, we are taking 2 stops, at station ‘1’ and station ‘4’. 

Similarly, there are 2 stops in the second path. Hence we’ll finally choose the 3rd path i.e. 0->3, which is colored in blue.
Problem approach

Ninja likes to travel a lot, but at the same time, he wants to save as much money as possible. There are ‘N’ Stations connected by ‘M’ Trains. Each train that he boards starts from station ‘A’ and reaches destination station ‘B’ with a ticket price ‘P’. Your task is to find the cheapest price from the given ‘source’ to ‘destination’ with up to ‘K’ stops. If there is no such route, print ‘-1’.

Try solving now
02
Round
Easy
Face to Face
Duration45 minutes
Interview date4 Aug 2022
Coding problem2

1. Network Delay Time

Easy
20m average time
80% success
0/40
Asked in companies
VisaShareChatDeHaat

You have been given a network of ‘N’ nodes from 1 to ‘N’ and ‘M’ edges. For each edge, you are given three values (ui, vi, wi) where “ui” and “vi” denote the nodes and “wi” denotes an integer value which represents the time taken by a signal to travel from “ui” to “vi”. Now, you are supposed to find the time which a signal takes to travel from a given node ‘K’ to all nodes. If it is impossible for all nodes to receive the signal then print -1.

Note:
The signal which starts from the source node travels to all nodes simultaneously.
Problem approach

You have been given a network of ‘N’ nodes from 1 to ‘N’ and ‘M’ edges. For each edge, you are given three values (ui, vi, wi) where “ui” and “vi” denote the nodes and “wi” denotes an integer value which represents the time taken by a signal to travel from “ui” to “vi”. Now, you are supposed to find the time which a signal takes to travel from a given node ‘K’ to all nodes. If it is impossible for all nodes to receive the signal then print -1.

Try solving now

2. Dice Throws

Hard
35m average time
65% success
0/120
Asked in companies
MicrosoftDisney + HotstarShareChat

You are given D dice, each having F faces numbered 1 to F, both inclusive. The task is to find the possible number of ways to roll the dice together such that the sum of face-up numbers equal the given target S.

Note :
As the answer can be large, return your answer modulo 10^9  + 7.
Follow Up :
Can you solve this using not more than O(S) extra space?
Problem approach

You are given D dice, each having F faces numbered 1 to F, both inclusive. The task is to find the possible number of ways to roll the dice together such that the sum of face-up numbers equal the given target S.

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
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by ShareChat
1639 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 3 problems
Interviewed by ShareChat
1756 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by ShareChat
1156 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 7 problems
Interviewed by ShareChat
2160 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57824 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes