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

SDE - 1

ShareChat
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: Data Structures & Algorithms, System Design (Basics), Resume Projects Revision
Tip
Tip

Tip 1 : Focus more on the problem-solving part, i.e. Data Structures & Algorithms and coding skills.
Tip 2 : You should be comfortable with Leetcode medium-level questions.
Tip 3 : Basic system design should be enough, basics of HLD (High-Level Design) & LLD (Low-Level Design)

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

Tip 1 : Keep your resume one-pager, short, and concise. They will be more interested in your problem-solving skills.
Tip 2 : Do not include redundant projects in your resume. Do not write about skills you are not good at.
Tip 3 : Focus on your previous work experience in your resume. That is one section, from which you will be asked questions.

Interview rounds

01
Round
Hard
Online Coding Interview
Duration90 Minutes
Interview date17 Jul 2021
Coding problem3

It was a coding round of a duration of 90 minutes hosted on HackerEarth. There were 3 coding questions. 
Question-1 Maximum Score: 20
Question-2 Maximum Score: 50
Question-3 Maximum Score: 100
Total Maximum Score: 170

Timing: You can take the test at your convenience. A deadline of 4-5 days was mentioned for that.

1. Increasing Subsegment

Moderate
15m average time
80% success
0/80
Asked in companies
FacebookIntuitShareChat

Gary has a sequence 'ARR', consisting of 'N' integers.

We'll call a sequence ARR[i],  ARR[i+1], ..., ARR[j] where 1  ≤  i  ≤  j  ≤  N a subsegment of the sequence ARR. The value (j - i + 1) denotes the length of the subsegment.

Your task is to find the longest subsegment of ARR, such that it is possible to change at most one number (change one number to any integer you want) from the subsegment to make the subsegment strictly increasing.

You need to return the length of the maximum subsegment that you can find by changing only one integer in the given sequence.

Try solving now

2. Subsequences of String

Moderate
15m average time
85% success
0/80
Asked in companies
Chegg Inc.Expedia GroupQuikr

You are given a string 'STR' containing lowercase English letters from a to z inclusive. Your task is to find all non-empty possible subsequences of 'STR'.

A Subsequence of a string is the one which is generated by deleting 0 or more letters from the string and keeping the rest of the letters in the same order.
Try solving now

3. Minimum Cost to Hire M Candidates

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

You are the HR of the Ninja team and planning to hire ‘M’ candidates out of ‘N’ candidates to form a paid group. The candidates have been evaluated on the basis of their skills and have been asked for their minimum salary expectations. So, you are given two arrays, ‘SKILL’ and ‘EXPECTED_SALARY’, where ‘SKILL[i]’ and ‘EXPECTED_SALARY[i]’ represent the skill and minimum salary expectation of ‘i-th’ candidate, respectively. You have to consider the following two rules for hiring a group of ‘M’ candidates:

1) Every candidate in the paid group should be paid in the ratio of their skill compared to other candidates in the paid group.
2) The minimum salary expectation of every candidate in the paid group should be fulfilled.

You have to return the minimum amount of money required to hire ‘M’ candidates as per the above-mentioned rules.

Note:

Answers which are within the range 10^-6 of the correct answer will be considered correct.
Try solving now
02
Round
Medium
Video Call
Duration60 Minutes
Interview date22 Jul 2021
Coding problem1

It was an online interview round. The round was based on problem-solving and DSA (Data Structures & Algorithms).

Timing: 4:00 PM - 5:00 PM
Environment: Google Meet
Interviewer was an SDE-2 at ShareChat was very helpful.

1. LCA In A BST

Moderate
15m average time
85% success
0/80
Asked in companies
Morgan StanleyGoldman SachsAcko

You are given a binary search tree of integers with N nodes. You are also given references to two nodes 'P' and 'Q' from this BST.


Your task is to find the lowest common ancestor(LCA) of these two given nodes.


The lowest common ancestor for two nodes P and Q is defined as the lowest node that has both P and Q as descendants (where we allow a node to be a descendant of itself)


A binary search tree (BST) is a binary tree data structure which has the following properties.

• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.


For example:
'P' = 1, 'Q' = 3
tree = 2 1 4 -1 -1 3 -1 -1 -1,

The BST corresponding will be- 

Here, we can clearly see that LCA of node 1 and node 3 is 2.
Problem approach

Approach: 
Following is the simple approach for Least Common Ancestor for any number of nodes. 

For every node calculate the matching number of nodes at that node and its sub-tree. 
-> If root is also a matching node (matchingNodes = matchingNodes in left sub-tree + matchingNodes in right sub-tree + 1)
-> If root is not a matching node (matchingNodes = matchingNodes in left sub-tree + matchingNodes in right-subtree)
-> If matching Nodes count at any node is equal to number of keys then add that node into the Ancestors list.
-> The First node in the Ancestors List is the Least Common Ancestor of all the given keys.

Try solving now
03
Round
Medium
Video Call
Duration60 Minutes
Interview date28 Jul 2021
Coding problem1

This was the last hiring manager round.
Timing: 6:00 PM - 7:00 PM
Environment: Google meet
The interviewer was an Engineering Manager in ShareChat and was an experienced, guy.

1. URL Shortener

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

You have given a URL id – 'N' consisting of only digits. Your task is to generate a short URL for the given URL id.

To generate a short URL, you need to convert the given URL id to 62 base number where digits of the number are:[“0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ”] i.e “0” corresponds to 0, “a” corresponds to 10, “Z” corresponds to 61, and “10” corresponds to 62, “11” corresponds to 63, and so on….

Follow Up:
Can you solve this in logarithmic time and space complexity?
Problem approach

Approach:
1. We can use hashing to hash the long URL into a short URL. That's one approach.
2. We can also create a short URL with just 7 characters, and lowercase English characters. Corresponding to every 
long URL, we can generate a short URL of length 7 with 7 randomly chosen characters. Since (26^7) is very high, 
so the chances of the collision are very low and there can be a large pool of long URLs for which you will be able to 
create short URLs.

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
4 rounds | 3 problems
Interviewed by ShareChat
1756 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by ShareChat
1157 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by ShareChat
1230 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 7 problems
Interviewed by ShareChat
2161 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
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes