Chegg Inc. interview experience Real time questions & tips from candidates to crack your interview

SDE

Chegg Inc.
upvote
share-icon
2 rounds | 5 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 leetcode and code studio.
Application story
This company visited to my campus for the selection they first took a test then allow us to come for the interview.
Why selected/rejected for the role?
I was rejected because I have a good history of content preparation and i do not have a decent rank in leetcode and code forces. ,
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Practice from Leetcode, solve Leetcode medium level problems.
Tip 2 : Brush up computer fundamentals from subjects like OS, DBMS and CN.
Tip 3 : Have a good project or good internship experience and have in-depth knowledge regarding what you have done.

Application process
Where: Campus
Eligibility: Above 8+
Resume Tip
Resume tip

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Hard
Video Call
Duration60 minutes
Interview date20 Aug 2022
Coding problem3

1. Spell Checker

Hard
50m average time
50% success
0/120
Asked in companies
AtlassianFlipkart limitedGoogle inc

You are given a list of strings, ‘DICTIONARY[]’ that represents the correct spelling of words and a query string ‘QUERY’ that may have incorrect spelling. You have to check whether the spelling of the string ‘QUERY’ is correct or not. If not, then return the list of suggestions from the list ‘DICTIONARY’. Otherwise, return an empty list which will be internally interpreted as the correct string.

Note:

1) The suggested correct strings for the string  ‘QUERY’ will be all those strings present in the ‘DICTIONARY[]’ that have the prefix same as the longest prefix of string ‘QUERY’.

2) The ‘DICTIONARY[]’ contains only distinct strings.

For example:

Given 'DICTIONARY[]' = {“ninja”, “ninjas”, “nineteen”, “ninny”} and query = “ninjk”. Since “ninjk” is not present in the ‘DICTIONARY[]’, it is an incorrect string. The suggested current spellings for “ninjk” are “ninja” and “ninjas”. It is because “ninj” is the longest prefix of “ninjk” which is present as the prefix in ‘DICTIONARY’.
Problem approach

You are given a list of strings, ‘DICTIONARY[]’ that represents the correct spelling of words and a query string ‘QUERY’ that may have incorrect spelling. You have to check whether the spelling of the string ‘QUERY’ is correct or not. If not, then return the list of suggestions from the list ‘DICTIONARY’. Otherwise, return an empty list which will be internally interpreted as the correct string.

Try solving now

2. OOPS Questions

1. Define copy constructor. Where it is used?
2. Define encapsulation and abstraction.

Problem approach

Tip 1 : Refer to OOPs modules in Coding Ninja's Data Structure and Algorithm course. It is great for OOPs concepts.
Tip 2 : Always give proper definitions along with examples.
Tip 3 : Make notes for topics like OOPs and DBMS while preparing.

3. DBMS Questions

1.Explain ACID properties.
2.What is Join? Explain Natural join, Cross Join, Left and Right Join.

Problem approach

Tip 1 : Give your answer in a structured manner. Also, don't use those technical terms which you aren't clear with.
Tip 2 : Try to communicate clearly with the interviewer. Explain your solution clearly.

02
Round
Hard
Video Call
Duration60 minutes
Interview date20 Aug 2022
Coding problem2

1. The Skyline Problem

Hard
15m average time
85% success
0/120
Asked in companies
Samsung R&D InstituteAppleUber

You are given 'N' rectangular buildings in a 2-dimensional city. Your task is to compute the skyline of these buildings, eliminating hidden lines return the skyline formed by these buildings collectively. A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. The geometric information of each building is given in the array of buildings where BUILDINGS[i] = [LEFT_i, RIGHT_i, HEIGHT_i]:

-> LEFT_i is the x coordinate of the left edge of the ith building.

-> RIGHT_i is the x coordinate of the right edge of the ith building.

-> HEIGHT_i is the height of the ith building.

You may assume all buildings are perfect rectangles grounded on an absolutely flat surface at height 0.

The skyline should be represented as a list of "key points" sorted by their x-coordinate in the form [[x1, y1], [x2, y2], ...]. Each key point is the left endpoint of some horizontal segment in the skyline except the last point in the list, which always has a y-coordinate 0 and is used to mark the skyline's termination where the rightmost building ends. Any ground between the leftmost and rightmost buildings should be part of the skyline's contour.

Note:
There must be no consecutive horizontal lines of equal height in the output skyline. For instance, [...,[2 3], [4 5], [7 5], [11 5], [12 7],...] is not acceptable; the three lines of height 5 should be merged into one in the final output.

As such: [..., [2 3], [4 5], [12 7],...]. 

Also, the buildings are sorted by a non-decreasing order.

For more clarification see sample case 1.
Problem approach

You are given 'N' rectangular buildings in a 2-dimensional city. Your task is to compute the skyline of these buildings, eliminating hidden lines return the skyline formed by these buildings collectively. A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. The geometric information of each building is given in the array of buildings where BUILDINGS[i] = [LEFT_i, RIGHT_i, HEIGHT_i]:
-> LEFT_i is the x coordinate of the left edge of the ith building.
-> RIGHT_i is the x coordinate of the right edge of the ith building.
-> HEIGHT_i is the height of the ith building.
You may assume all buildings are perfect rectangles grounded on an absolutely flat surface at height 0.
The skyline should be represented as a list of "key points" sorted by their x-coordinate in the form [[x1, y1], [x2, y2], ...]. Each key point is the left endpoint of some horizontal segment in the skyline except the last point in the list, which always has a y-coordinate 0 and is used to mark the skyline's termination where the rightmost building ends. Any ground between the leftmost and rightmost buildings should be part of the skyline's contour.

Try solving now

2. Umbrella

Moderate
25m average time
75% success
0/80
Asked in companies
SamsungDisney + HotstarArcesium

You are given ‘N’ types of umbrellas, where each umbrella can shelter some number of people. Given the number of people each umbrella can shelter in the array “UMBRELLA”, you need to determine the minimum number of umbrellas required to cover exactly ‘M’ people with umbrellas.

Note -

You have an infinite number of umbrellas of each type.
If it is not possible to shelter exactly ‘M’ people then print -1. 
Problem approach

You are given ‘N’ types of umbrellas, where each umbrella can shelter some number of people. Given the number of people each umbrella can shelter in the array “UMBRELLA”, you need to determine the minimum number of umbrellas required to cover exactly ‘M’ people with umbrellas.

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
2 rounds | 5 problems
Interviewed by Chegg Inc.
1080 views
0 comments
0 upvotes
SDE - Intern
2 rounds | 3 problems
Interviewed by Chegg Inc.
853 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Chegg Inc.
995 views
1 comments
0 upvotes
Software Engineer
3 rounds | 6 problems
Interviewed by Chegg Inc.
835 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE
3 rounds | 6 problems
Interviewed by PhonePe
0 views
0 comments
0 upvotes
company logo
SDE
5 rounds | 8 problems
Interviewed by Mathworks
1205 views
0 comments
0 upvotes
company logo
SDE
4 rounds | 7 problems
Interviewed by PhonePe
0 views
0 comments
0 upvotes