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

SDE - 1

Addverb
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: 1)Data structures and Algorithms2)Programming language (C++)3)OOPS4)DBMS5)SQL6)Html,CSS
Tip
Tip

Tip 1 : Practice at least 400 to 500 questions of DSA.
Tip 2 : Also focus on core subjects like OOPS,DBMS ,CN.
Tip 3 : Make good project.

Application process
Where: Campus
Eligibility: 7 CPI or above.
Resume Tip
Resume tip

Tip 1 : Mention only those things which you are confident.
Tip 2 : Make resume according to job role.

Interview rounds

01
Round
Medium
Face to Face
Duration45 minutes
Interview date27 Oct 2021
Coding problem4

In the first round there was one interviewer.So the interview started with tell me about yourself.This was very famous interview question.I had given around 3 minutes of introduction.He was happy with the introduction.Then he asked me about coding language in which I am comfortable.I told him about C++.So he gave me Linked list question i.e. Determine whether loop is present in a given linked list or not.So I had wrote the code on the paper with the help of pen.After that he asked me about optimized solution.I just gave the idea how I can implement.He was satisfied with my solution.Then he asked me how you can count the length of linked list.He just want approach and I was able to gave that.After that he asked questions on binary search tree.So the question was like "A program to check if a binary tree is BST or not".He was expecting code from my side.And I was not able to wrote the code.I just gave him only logic how can we implement.After that he asked me question on same topic.The question was like "Find the Maximum Depth or Height of given Binary Tree".I was able to wrote the code for this questions.He was satisfied with my coding skills.Then he started asking questions on object oriented programming.Around he asked me all the concepts regarding this topic.AsI mentioned SQL in my resume.The he given me two tables and asked me some queries on that.Basically these queries were based on Joins.After he started with project.He firstly asked me to explain about your project.I had given brief explanation.Then he asked me questions on internship.After that he asked me some non technical questions like strengths,weakness and hobbies.After that he said me I am done with your interview.

1. Detect and Remove Loop

Moderate
10m average time
90% success
0/80
Asked in companies
AmazonMicrosoftFreshworks

Given a singly linked list, you have to detect the loop and remove the loop from the linked list, if present. You have to make changes in the given linked list itself and return the updated linked list.

Expected Complexity: Try doing it in O(n) time complexity and O(1) space complexity. Here, n is the number of nodes in the linked list.

Problem approach

Initialise a hashmap.
Traverse the linked list till the head pointer isn’t NULL:
If the current node is already present in the hashset, it ensures that the linked list contains a loop. Hence, terminate and return True.
Else, continue traversing and continue inserting the node into the hashset.
Return False if it doesn’t satisfy the above conditions.

Try solving now

2. Check If Linked List Is Palindrome

Easy
15m average time
85% success
0/40
Asked in companies
AmazonThought WorksQuikr

You are given a Singly Linked List of integers. You have to return true if the linked list is palindrome, else return false.


A Linked List is a palindrome if it reads the same from left to right and from right to left.


Example:
The lists (1 -> 2 -> 1), (3 -> 4 -> 4-> 3), and (1) are palindromes, while the lists (1 -> 2 -> 3) and (3 -> 4) are not.
Try solving now

3. Validate BST

Moderate
25m average time
0/80
Asked in companies
FacebookAmazonFreshworks

You have been given a binary tree of integers with N number of nodes. Your task is to check if that input tree is a BST (Binary Search Tree) or not.

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.
Example :

BST1

Answer :

Level 1: 

All the nodes in the left subtree of 4 (2, 1, 3) are smaller 
than 4, all the nodes in the right subtree of the 4 (5) are 
larger than 4.

Level 2 :

For node 2:
All the nodes in the left subtree of 2 (1) are smaller than 
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtrees for node 5 are empty.

Level 3:

For node 1:
The left and right subtrees for node 1 are empty.
For node 3:
The left and right subtrees for node 3 are empty.

Because all the nodes follow the property of a binary search tree, the above tree is a binary search tree.
Problem approach

If the current node is null then return true
If the value of the left child of the node is greater than or equal to the current node then return false
If the value of the right child of the node is less than or equal to the current node then return false
If the left subtree or the right subtree is not a BST then return false
Else return true

Try solving now

4. Maximum Depth Of A Binary Tree

Easy
15m average time
85% success
0/40
Asked in companies
FacebookWalmartRed Hat

You are given the root node of a binary tree with N nodes, whose nodes have integer values. Your task is to find the maximum depth of the given Binary tree.

Depth of a binary tree is the same as its height. In simpler terms, you have to find the total number of nodes encountered while moving from the root node to the farthest leaf node, along the longest path of the binary tree.

Example:-

example

If we are given the above binary tree as input then moving from root node(5) to the farthest leaf node(50), the path formed will be [ 5->10->25->35->40->45->50 ]. The total number of nodes encountered is 7, therefore the maximum depth of the binary tree is 7.
Problem approach

Recursively do a Depth-first search.
If the tree is empty then return -1
Otherwise, do the following
Get the max depth of the left subtree recursively i.e. call maxDepth( tree->left-subtree)
Get the max depth of the right subtree recursively i.e. call maxDepth( tree->right-subtree)
Get the max of max depths of left and right subtrees and add 1 to it for the current node.
max_depth = max(max dept of left subtree, max depth of right subtree) + 1
Return max_depth.

Try solving now
02
Round
Medium
Video Call
Duration15 minutes
Interview date27 Oct 2021
Coding problem1

So the second round was virtual .In second round interviewer asked me about project.Why this technology used in this project? What difficulties you faced while creating this project? such type of question were asked.Then he gave me very simple question i.e. Reverse a string .I wrote the code for this problem within 3 minutes.After that he asked me some question on c++ like difference between pass by value and pass by reference,what is static variable and static function.After that he asked me "Do you have any questions for me?''.I asked one question then the interview was over.

1. Reverse String

Moderate
0/80
Asked in companies
IBMMcAfeeAdobe

You are given a string ‘S’. You are also given ‘M’ integers in an array ‘A’. You perform ‘M’ operations on this string. The operations are given in an array ‘A’ of size ‘M’.

You perform the operations in the order they appear in the array ‘A’. In the ‘i’th operation, you reverse the substring of ‘S’ from the position ‘A[i]’ to ‘len(S)’ - ‘A[i]’ - 1 (0 based).

Your task is to find the string after performing all the operations.

Example :
‘S’ = “aabcd”, ‘M’ = 2, ‘A’ = [0, 1]
After 1st operation i.e, reversing from [0, 4], ‘S’ = “dcbaa”.
After 2nd operation i.e, reversing from [1, 3], ‘S’ = “dabca”.
Hence, the answer is “dabca”.
Try solving now
03
Round
Easy
Video Call
Duration15 minutes
Interview date27 Sep 2022
Coding problem1

In the third round interview started with introduction .Then he asked me to code reverse a string using recursion.I was able to code with recursion.Then he asked me some questions on project.My project was in the domain of web development.So he asked me design simple web page using Material UI.I was not able to do this things .After he asked me Do you have any questions for me?And the interview was over.

1. Design Question

He asked me to design web page using Material UI

Problem approach

Tip 1:Do practice on the project technologies.
 

04
Round
Easy
HR Round
Duration15 minutes
Interview date27 Oct 2021
Coding problem0

I was not selected in this round.But I asked to my friend which question were asked during this round.Basically HR asked him about family,hobbies,strengths,weakness.And also asked him can u come in Noida from your city i.e. Mumbai.

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 | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
961 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 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