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

Software Engineer

Chegg Inc.
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
My journey started when I was in class 12th, and my teacher guided me to take part in the coding competitions. After that, I started participating in them and developed a habit of doing coding questions.
Application story
I applied to this company through the on-campus opportunity as my college is a tier 1 college. This company always visits my college for hire.
Why selected/rejected for the role?
I was rejected because I could not explain all the concepts with the correct accuracy.
Preparation
Duration: 6 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Regarding DSA preparation, I have a theory. Twenty percent of the questions will be asked in 80 percent of the interviews, and 80 percent will be asked in 20 percent. In short, some questions have a high chance of coming up during the interviews, and some have a very low probability. We should focus more on the questions that have more chance of coming up in the interview. 

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

Tip 1: Make Sure your resume is simple, and also try to fit all the information on only one page.
Tip 2: Have at least two projects with the latest technologies. Github link of projects should be provided.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date28 Oct 2022
Coding problem2

1. Largest Component

Moderate
45m average time
55% success
0/80
Asked in companies
OlaMicrosoftChegg Inc.

You are given an array 'ARR' of size 'N' containing positive integers. Consider an undirected graph using the given array with the following conditions:

-> The graph consists of 'N' vertices.
-> The ith vertex has a value 'ARR[i]'.
-> There is an edge between two vertices 'i' and 'j' (where 'i' < 'j'), if and only if GCD('ARR[i]', 'ARR[j]') is greater than 1.

GCD(a, b) is the maximum number x such that both a and b are divisible by x.

Your task is to find the size of the largest component in the graph.

A component of an undirected graph is a subgraph in which any two vertices are connected to each other by paths, and which is connected to no additional vertices in the rest of the graph. The size of a component is the number of vertices in it.

Problem approach

Used DSU and a bit of maths

Try solving now

2. Decode Ways

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

Given a string ‘strNum’ which represents a number, your task is to find the ways to decode the given string ‘strNum’.

The format of encoding is as follows: ‘A’ - 1, ‘B’ - 2, ‘C’ - 3, ‘D’ - 4, ……………, ‘Z’ - 26.

Encoding is possible in letters from ‘A’ to ‘Z’. There is an encoding between character and number.

Example :

subsequence

‘n = 226’ so we can decode ‘226’ in such a way-

‘BZ = 2-26’, as B maps to 2 and Z maps to 26.

‘BBF = 2-2-6’

‘VF = 22-6’

‘226; can be decoded in three ‘BZ’, ‘BBF’, ‘VF’ possible ways.

Point to be noticed we can’t decode ‘226’ as ‘226’ because we have no character which can directly map with ‘226’ we can only decode numbers from ‘1’ to ‘26’ only.

Problem approach

Used recursion and DP

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date28 Oct 2022
Coding problem2

1. Shortest substring with all characters

Moderate
18m average time
85% success
0/80
Asked in companies
Chegg Inc.IntuitAmazon

You have been given a string 'S' which only consists of lowercase English-Alphabet letters.

Your task is to find the shortest(minimum length) substring of 'S' which contains all the characters of 'S' at least once. If there are many substrings with the shortest length, then find one which appears earlier in the string i.e. substring whose starting index is lowest.

For example-
If the given string is S = "abcba", then the possible substrings are "abc" and "cba". As "abc" starts with a lower index (i.e. 0, "cba" start with index 2), we will print "abc" as our shortest substring that contains all characters of 'S'.
Problem approach

Used 2 pointer sliding window

Try solving now

2. Zigzag Binary Tree Traversal

Easy
10m average time
90% success
0/40
Asked in companies
Goldman SachsAmazonFlexiEle Consulting Services (FE)

You are given a ‘Binary Tree’.


Return the level-order traversal of the Binary Tree.


Example:
Input: Consider the following Binary Tree:

Example

Output: 
Following is the level-order traversal of the given Binary Tree: [1, 2, 3, 5, 6, 4]


Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date28 Oct 2022
Coding problem2

1. Equilibrium Index

Easy
0/40
Asked in companies
Expedia GroupCoinbaseGoldman Sachs

You are given an array Arr consisting of N integers. You need to find the equilibrium index of the array.

An index is considered as an equilibrium index if the sum of elements of the array to the left of that index is equal to the sum of elements to the right of it.

Note:

1. The array follows 0-based indexing, so you need to return the 0-based index of the element.
2. Note that the element at the equilibrium index won’t be considered for either left sum or right sum.
3. If there are multiple indices which satisfy the given condition, then return the left-most index i.e if there are indices i,j,k…. which are equilibrium indices, return the minimum among them
4. If no such index is present in the array, return -1.
Try solving now

2. Maximum meetings

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

You are given the schedule of 'N' meetings with their start time 'Start[i]' and end time 'End[i]'.


You have only 1 meeting room. So, you need to return the maximum number of meetings you can organize.


Note:
The start time of one chosen meeting can’t be equal to the end time of the other chosen meeting.


For example:
'N' = 3, Start = [1, 3, 6], End = [4, 8, 7].

You can organize a maximum of 2 meetings. Meeting number 1 from 1 to 4, Meeting number 3 from 6 to 7.
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 - 1
3 rounds | 7 problems
Interviewed by Chegg Inc.
1139 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
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7873 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
9973 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4310 views
1 comments
0 upvotes