Upload Button Icon Add office photos

Filter interviews by

Eat Repeat India Pvt Ltd Head Office SDE-2 Interview Questions and Answers

Be the first one to contribute and help others!

Interview questions from similar companies

SDE-2 Interview Questions & Answers

Amazon user image Anonymous

posted on 19 May 2022

I appeared for an interview before May 2021.

Round 1 - Face to Face 

(1 Question)

Round duration - 45 Minutes
Round difficulty - Easy

  • Q1. 

    Balanced Parentheses Combinations

    Given an integer N representing the number of pairs of parentheses, find all the possible combinations of balanced parentheses using the given number of pairs.

    Explanati...

  • Ans. 

    Generate all possible combinations of balanced parentheses for a given number of pairs.

    • Use recursion to generate all possible combinations of balanced parentheses.

    • Keep track of the number of open and close parentheses used in each combination.

    • Terminate recursion when the number of open and close parentheses used equals the given number of pairs.

  • Answered by AI
Round 2 - Face to Face 

(1 Question)

Round duration - 45 Minutes
Round difficulty - Easy

  • Q1. 

    Boundary Traversal of Binary Tree Problem Statement

    You are given a binary tree of integers. Your task is to print the boundary nodes of this binary tree in an anti-clockwise direction starting from the ro...

  • Ans. 

    Print the boundary nodes of a binary tree in an anti-clockwise direction starting from the root node.

    • Traverse the left boundary nodes from top to bottom

    • Traverse the leaf nodes from left to right

    • Traverse the right boundary nodes from bottom to top

    • Handle cases where nodes are null (-1)

    • Print the boundary nodes in the specified order

  • Answered by AI
Round 3 - Face to Face 

(1 Question)

Round duration - 45 Minutes
Round difficulty - Easy

  • Q1. 

    Bottom View of Binary Tree Problem Statement

    Given a binary tree, the task is to print its bottom view from left to right. Assume the left and the right child nodes make a 45-degree angle with their paren...

  • Ans. 

    The task is to print the bottom view of a binary tree from left to right.

    • Traverse the binary tree in level order and keep track of the horizontal distance of each node from the root.

    • For each horizontal distance, update the node value in a map to get the bottom view nodes.

    • Print the values of the map in sorted order of horizontal distance to get the bottom view sequence.

  • Answered by AI
Round 4 - Telephonic Call 

(1 Question)

Round duration - 45 minutes
Round difficulty - Easy

Bar raiser

  • Q1. Can you design a parking lot using low-level design (LLD) and a tiny URL service using high-level design (HLD)?
  • Ans. 

    Yes, I can design a parking lot using LLD and a tiny URL service using HLD.

    • For designing a parking lot using LLD, we can create classes like ParkingLot, ParkingSpot, Vehicle, etc. with their respective attributes and methods.

    • For designing a tiny URL service using HLD, we can focus on scalability, fault tolerance, and performance. We can use techniques like sharding, caching, load balancing, etc.

    • In the parking lot LLD, ...

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in BangaloreEligibility criteriaNoAmazon interview preparation:Topics to prepare for the interview - DS Algos: Binary Trees, Topological Sort, Tries, Linked List, Arrays, StringsTime required to prepare for the interview - 6 monthsInterview preparation tips for other job seekers

Tip 1 : Prepare 1-2 examples for each Leadership Principles 
Tip 2 : Prepare questions from the latest interview experiences

Application resume tips for other job seekers

Tip 1 : Concise, without errors
Tip 2 : Highlight years of experience

Final outcome of the interviewSelected

Skills evaluated in this interview

Interview Questionnaire 

1 Question

  • Q1. All algorithms and system design

SDE-2 Interview Questions & Answers

TCS user image Anonymous

posted on 16 Sep 2021

I appeared for an interview in Sep 2020.

Round 1 - Coding Test 

(1 Question)

Round duration - 180 minutes
Round difficulty - Hard

Timing: 8 a.m. to 11a.m.
Environment was optimum.
No significant activity.

  • Q1. 

    Edit Distance Problem Statement

    Given two strings S and T with lengths N and M respectively, your task is to find the "Edit Distance" between these strings.

    The Edit Distance is defined as the minimum nu...

  • Ans. 

    The task is to find the minimum number of operations required to convert one string into another using delete, replace, and insert operations.

    • Use dynamic programming to solve the problem efficiently.

    • Create a 2D array to store the minimum edit distance for substrings of the two input strings.

    • Iterate through the strings and update the array based on the operations needed for each character.

    • Return the value in the bottom ...

  • Answered by AI
Round 2 - Video Call 

Round duration - 30 minutes
Round difficulty - Medium

Timing: 12:00 p.m. to 12:30 p.m.
The environment was quite good.
No significant activity.
Interviewers were very friendly. They were behaving like friends.

Round 3 - HR 

Round duration - 15 minutes
Round difficulty - Easy

Timing: 3:00 p.m. to 3:20 p.m.
Environment was very good.
No significant activity was monitored.
HR was very good and friendly.

Interview Preparation Tips

Professional and academic backgroundI completed Civil Engineering from Heritage Institute of Technology. I applied for the job as SDE - 2 in KolkataEligibility criteriaAbove 6.5 CGPATata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - Data Structures, Dynamic Programming, OOPS, Computer Networks, System DesignTime required to prepare for the interview - 7 monthsInterview preparation tips for other job seekers

Tip 1 : Do minimum 3 projects
Tip 2 : Prepare every topic of DSA for interview
Tip 3 : Hands on experience in performing MySql commands

Application resume tips for other job seekers

Tip 1 : Be precise and don't bluff
Tip 2 : Learn atleast 2 programming languages
Tip 3 : Do projects on latest technologies like Artificial Intelligence and Machine Learning

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

Amazon user image Anonymous

posted on 2 Apr 2015

Interview Questionnaire 

10 Questions

  • Q1. Find sum of all numbers that are formed from root to leaf path (code) expected time complexity O(n)
  • Ans. 

    Find sum of all numbers formed from root to leaf path in a binary tree

    • Traverse the binary tree using DFS

    • At each leaf node, add the number formed from root to leaf path to a sum variable

    • Return the sum variable

    • Time complexity: O(n)

    • Example: For a binary tree with root value 1, left child 2 and right child 3, the sum would be 12 + 13 = 25

  • Answered by AI
  • Q2. Given a string you need to print all possible strings that can be made by placing spaces (zero or one) in between them. For example : ABC -> A BC, AB C, ABC, A B C
  • Ans. 

    Given a string, print all possible strings that can be made by placing spaces (zero or one) in between them.

    • Use recursion to generate all possible combinations of spaces

    • For each recursive call, either add a space or don't add a space between the current character and the next character

    • Base case is when there are no more characters left to add spaces between

    • Time complexity is O(2^n) where n is the length of the string

  • Answered by AI
  • Q3. Preorder traversal without using recursion
  • Ans. 

    Preorder traversal without recursion

    • Use a stack to keep track of nodes

    • Push right child first and then left child onto stack

    • Pop top of stack and print value

    • Repeat until stack is empty

  • Answered by AI
  • Q4. There is a 12 km road and a contractor who is in-charge of repairing it. Contractor updates you about the work which is done in patches. Like “Road between 3.2 km to 7.9 km repaired ”, “Road between 1.21 k...
  • Ans. 

    Find longest continuous patch on a 12 km road with updates in patches

    • Maintain a variable to keep track of current patch length

    • Update the variable whenever a new patch is added

    • Maintain a variable to keep track of longest patch so far

    • Compare current patch length with longest patch length and update if necessary

    • Use a sorted data structure like a binary search tree to store the patches for efficient search

    • Time complexity: ...

  • Answered by AI
  • Q5. Several Questions were asked from my project
  • Q6. Find median of an unsorted array. (code
  • Ans. 

    Find median of an unsorted array.

    • Sort the array and find the middle element

    • Use quickselect algorithm to find the median in O(n) time

    • If the array is small, use brute force to find the median

  • Answered by AI
  • Q7. General discussion on heaps
  • Q8. A stream of characters is coming, at any moment you have to tell ‘k’ elements closest to a given number (code)
  • Ans. 

    Find 'k' elements closest to a given number from a stream of characters.

    • Use a priority queue to keep track of closest elements.

    • Update the queue as new characters come in.

    • Return the 'k' closest elements from the queue.

  • Answered by AI
  • Q9. Design data structure that supports insert(), remove(), find-max(), delete-max() operations. All operations should run in O(1) time. Lots of discussion was there, discussed many approaches.
  • Ans. 

    Design a data structure with O(1) insert, remove, find-max, and delete-max operations.

    • Use a doubly linked list to maintain the elements in sorted order.

    • Use a hash table to store the pointers to the nodes in the linked list.

    • Maintain a pointer to the maximum element in the hash table.

    • Update the pointers in the hash table when inserting or removing elements.

    • Update the maximum pointer when deleting or inserting the maximum

  • Answered by AI
  • Q10. Check whether given link list represents palindrome
  • Ans. 

    Check if a given linked list is a palindrome.

    • Traverse the linked list and store the values in an array.

    • Compare the first and last elements of the array, then move towards the center.

    • If all elements match, the linked list is a palindrome.

    • Alternatively, use two pointers to find the middle of the linked list and reverse the second half.

    • Compare the first half with the reversed second half to check for a palindrome.

  • Answered by AI

Interview Preparation Tips

Round: Technical Interview
Experience: Recently I attended Amazon Bangalore interview for SDE 2 position. All f2f and no phone/written screening as I had attended one before and cleared those. Total 4 rounds wer der. The first techh round dey asked mi questions listed above.
Tips: NA

Round: Technical Interview
Experience: ROUND 2 dey asked mi above questions
Tips: NA

Round: Technical Interview
Experience: Round 3 Above questions wer asked.

Round: Technical Interview
Experience: This was the last round. thy asked mi above questions

College Name: NA

Skills evaluated in this interview

I appeared for an interview before May 2021.

Round 1 - Telephonic Call 

(1 Question)

Round duration - 30 minutes
Round difficulty - Medium

  • Q1. 

    Remove Consecutive Duplicates Problem Statement

    Given a string S, your task is to recursively remove all consecutive duplicate characters from the string.

    Input:

    String S

    Output:

    Output string

    Constr...

  • Ans. 

    Recursively remove consecutive duplicate characters from a string.

    • Use recursion to check if the current character is the same as the next character, if so, skip the next character

    • Base case: if the string is empty or has only one character, return the string

    • Recursive case: if the current character is the same as the next character, call the function recursively with the string excluding the next character

  • Answered by AI
Round 2 - Face to Face 

(1 Question)

Round duration - 90 minutes
Round difficulty - Easy

  • Q1. 

    Reverse String Operations Problem Statement

    You are provided with a string S and an array of integers A of size M. Your task is to perform M operations on the string as specified by the indices in array A...

  • Ans. 

    Perform a series of reverse string operations on a given string based on specified indices.

    • Iterate through the array of indices and reverse the substring of the string based on the given indices.

    • Ensure to reverse the substring from the starting index to len(S) - starting index - 1.

    • Continue the operations in the sequence specified by the array of indices to get the final string.

  • Answered by AI
Round 3 - HR 

Round duration - 50 minutes
Round difficulty - Medium

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in BangaloreEligibility criteria60%Tech Mahindra interview preparation:Topics to prepare for the interview - Java, Data Structures, Oops Concept, Angular, Basic fundamental of Computer ScienceTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Prepare well for resume & confidence for basic part of CS.
Tip 2 : Good knowledge of skills set which mentioned in CV.
Tip 3 : Explain about projects which you have worked earlier & your roles and responsibilities.

Application resume tips for other job seekers

Tip 1 : Mentioned all the skills & certificate till date update your resume every 3 month's. 
Tip 2 : Proper skills set with project explanation and duration of project which you have worked on

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

Genpact user image Anonymous

posted on 17 May 2022

I appeared for an interview before May 2021.

Round 1 - Coding Test 

(1 Question)

Round duration - 60 minutes
Round difficulty - Easy

It is online round and it was conducted around 11 AM on campus. Difficulty was medium. 2 coding questions were asked. One question is based on arrays(easy) and the other question is based on usage of oops concepts like Inheritance, polymorphism. Everything went smooth.

  • Q1. 

    Subarray With Given Sum Problem Statement

    Given an array ARR of N integers and an integer S, determine if there exists a contiguous subarray within the array with a sum equal to S. If such a subarray exis...

  • Ans. 

    Given an array of integers, find a subarray with a given sum S.

    • Use a sliding window approach to find the subarray with the given sum.

    • Keep track of the current sum and adjust the window based on the sum.

    • Return the start and end indices of the subarray if found, otherwise return [-1, -1].

  • Answered by AI
Round 2 - Video Call 

(4 Questions)

Round duration - 50 minutes
Round difficulty - Medium

Round started with self introduction and discussion of project. Everything went fine.
Note: we didn't have hr round due to time constraint. You can expect hr round.

  • Q1. 

    Find the Duplicate Number Problem Statement

    Given an integer array 'ARR' of size 'N' containing numbers from 0 to (N - 2). Each number appears at least once, and there is one number that appears twice. Yo...

  • Ans. 

    Find the duplicate number in an array of integers from 0 to (N-2).

    • Iterate through the array and keep track of the frequency of each number using a hashmap.

    • Return the number with a frequency greater than 1 as the duplicate number.

  • Answered by AI
  • Q2. Can you explain the concept of normalization and its types?
  • Ans. 

    Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.

    • Normalization is used to eliminate data redundancy and ensure data integrity in a database.

    • There are different normal forms such as 1NF, 2NF, 3NF, BCNF, and 4NF.

    • Each normal form has specific rules that must be followed to ensure data is properly organized.

    • Normalization helps in reducing data anomalies and incon...

  • Answered by AI
  • Q3. Can you explain the ACID properties in the context of database management systems?
  • Ans. 

    ACID properties are essential characteristics of a transaction in a database management system.

    • Atomicity ensures that either all operations in a transaction are completed successfully or none of them are.

    • Consistency ensures that the database remains in a valid state before and after the transaction.

    • Isolation ensures that the execution of multiple transactions concurrently does not interfere with each other.

    • Durability e...

  • Answered by AI
  • Q4. Can you explain the concepts of Object-Oriented Programming (OOP) with real-life examples?
  • Ans. 

    OOP is a programming paradigm based on the concept of objects, which can contain data and code to manipulate that data.

    • OOP focuses on creating objects that interact with each other to solve complex problems.

    • Encapsulation: Objects can hide their internal state and require interactions through well-defined interfaces. Example: A car object with methods like start(), stop(), accelerate().

    • Inheritance: Objects can inherit a...

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in BangaloreEligibility criteriaAbove 7cgpaGenpact interview preparation:Topics to prepare for the interview - Data Structures and Algorithms, Operating systems, DBMS, Computer Networks, OOPSTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Don't get frustrated if not selected, keep believing yourself.
Tip 2 : Prepare data structures and algorithms well. Practice coding daily. OOPS in any programming language will do. Prefer quality of codes to quantity.
Tip 3 : If possible do a project on full stack development.

Application resume tips for other job seekers

Tip 1 : Keep it simple and try to adjust everything in one page. As a fresher it is better if you can have 2 projects in your cv.
Tip 2 : Don't add unnecessary details such as parents details.

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

Amazon user image Anonymous

posted on 16 Sep 2021

I appeared for an interview in Apr 2021.

Round 1 - Video Call 

Round duration - 60 Minutes
Round difficulty - Medium

Timing: 10AM-11AM
Interviewer was quite supportive and helpful.
Environment was normal as usual and it was morning time

Round 2 - Video Call 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

Timing: 11AM-12PM
The interviewer was SDE2
He was checking the code for edge cases and was hinting if required

  • Q1. 

    Implementing a Priority Queue Using Heap

    Ninja has been tasked with implementing a priority queue using a heap data structure. However, he is currently busy preparing for a tournament and has requested yo...

  • Ans. 

    Implement a priority queue using a heap data structure with push, pop, getMaxElement, and isEmpty functions.

    • Implement a priority queue using a max heap data structure.

    • Use the provided class structure and complete the push, pop, getMaxElement, and isEmpty functions.

    • For push operation, insert the element into the heap and maintain the heap property.

    • For pop operation, remove the largest element from the heap.

    • For getMaxEle...

  • Answered by AI
  • Q2. 

    Ninja and the Bulbs Challenge

    Ninja owns an electronic shop and possesses 'N' bulbs. To verify the quality of the bulbs, Ninja performs a unique technique. After 'N' rounds of this process, bulbs that rem...

  • Ans. 

    Determine the number of good quality bulbs remaining after 'N' rounds of a unique technique.

    • Start with all bulbs on in the first round

    • Toggle every 'i' bulb in 'i' round

    • Count the bulbs that remain on after 'N' rounds

  • Answered by AI
Round 3 - Video Call 

(1 Question)

Round duration - 60 Minutes
Round difficulty - Medium

Timing: 6PM-7PM
The interviewer was not interactive and didn't gave any feedback whatsoever.
It was Hiring Manager Round
Interviewer was Software Development Manager at Amazon

  • Q1. 

    Maximize the Sum Through Two Arrays

    You are given two sorted arrays of distinct integers, ARR1 and ARR2. If there is a common element in both arrays, you can switch from one array to the other.

    Your task...

  • Ans. 

    Find the maximum sum by traversing through common elements in two sorted arrays.

    • Start with the array containing the smaller first common element

    • Switch arrays at common elements to maximize the sum

    • Continue adding elements until the end of the arrays

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from A. C. Patil College of Engineering. I applied for the job as SDE - 2 in BangaloreEligibility criteriaAbove 2 years of experienceAmazon interview preparation:Topics to prepare for the interview - Linkedlist, BST, Heap, Queue, Pointers, Binary SearchTime required to prepare for the interview - 2 MonthsInterview preparation tips for other job seekers

Tip 1 : Focus on internals of Data structure on how it actually works
Tip 2 : Implement the Data Structure from scratch, later you can use the inbuilt packages no problem but you must know the implementation
Tip 3 : Understand System Design concepts

Application resume tips for other job seekers

Tip 1 : Highlight your contributions you made and how it impacted the business and be real
Tip 2 : Mention the improvement figures like x% reduction in page load size, improved SEO ranking by x figure, reduce memory usage by y%

Final outcome of the interviewRejected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

Amazon user image Anonymous

posted on 16 Sep 2021

I appeared for an interview in Mar 2021.

Round 1 - Coding Test 

(2 Questions)

Round duration - 45 minutes
Round difficulty - Medium

This round was scheduled in the evening hours and all the participants were required to fill a form which was shared 15 minutes prior to the start of the online coding round. This form was filled out probably for the security reasons and to ensure that no one disinterested participant gives the test.

  • Q1. 

    Ways To Make Coin Change

    Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make...

  • Ans. 

    The task is to find the total number of ways to make change for a specified value using given denominations.

    • Use dynamic programming to solve this problem efficiently.

    • Create a 2D array to store the number of ways to make change for each value using different denominations.

    • Iterate through each denomination and update the array based on the number of ways to make change for each value.

    • Return the value at the last cell of

  • Answered by AI
  • Q2. 

    Validate Binary Search Tree (BST)

    You are given a binary tree with 'N' integer nodes. Your task is to determine whether this binary tree is a Binary Search Tree (BST).

    BST Definition:

    A Binary Search Tr...

  • Ans. 

    Validate if a given binary tree is a Binary Search Tree (BST) or not.

    • Check if the left subtree of a node contains only nodes with data less than the node's data

    • Check if the right subtree of a node contains only nodes with data greater than the node's data

    • Recursively check if both left and right subtrees are also binary search trees

  • Answered by AI
Round 2 - Telephonic Call 

(1 Question)

Round duration - 60 minutes
Round difficulty - Hard

This round was on call where I was just supposed to answer the tech questions that were asked. It started with a brief interview with one another and then moved to questions on DBMS, operating systems, computer networks and all. Almost 20-25 questions were asked and I probably answered 90% of them correctly.

  • Q1. 

    Reverse Linked List Problem Statement

    Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.

    Input:

    The first line of input is an intege...
  • Ans. 

    Reverse a singly linked list by altering the links between nodes.

    • Iterate through the linked list and reverse the links between nodes

    • Use three pointers to keep track of the current, previous, and next nodes

    • Update the links between nodes to reverse the list

    • Return the head of the reversed linked list

  • Answered by AI
Round 3 - HR 

Round duration - 30 minutes
Round difficulty - Hard

There was only one interviewer for this round. He continuously interacted with me and was giving me some good situational problems that were not very easy to answer. Basically those were open-minded questions which can be answered oth ways and that's why I found it quiet hard as per my nature but at the end things went well for me.

Interview Preparation Tips

Professional and academic backgroundI completed Mechanical Engineering from Malaviya National Institute of Technology Jaipur. I applied for the job as SDE - 2 in HyderabadEligibility criteriaabove 7 cgpa, no backlogsAmazon interview preparation:Topics to prepare for the interview - Data Structures, hashmap, linked list, Pointers, OOPS, System Design, Algorithms, Dynamic Programming, array, 2-pointer problemsTime required to prepare for the interview - 8 monthsInterview preparation tips for other job seekers

Tip 1 : practice on gfg and coding ninjas
Tip 2 : compete on codechef and codeforces
Tip 3 : learn DSA and practice regularly

Application resume tips for other job seekers

Tip 1 : put your entire valuable experience in brief
Tip 2 : put the handle of you competitive coding profiles
Tip 3 : try to put those things that really attracts the recruiter, will be better if your past experiences relates to the company

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

Amazon user image Anonymous

posted on 16 Sep 2021

I appeared for an interview in Oct 2020.

Round 1 - Face to Face 

(3 Questions)

Round duration - 60 mins
Round difficulty - Medium

3 Questions were asked : 2- Trees and 1- Stack.
Interviewer was not receptive at all, I think this was a stress interview.

  • Q1. 

    Validate Binary Search Tree Problem Statement

    Given a binary tree with 'N' nodes, determine if it is a Binary Search Tree (BST). Return true if the tree is a BST, otherwise return false.

    Example:

    Input:
    ...
  • Ans. 

    Validate if a given binary tree is a Binary Search Tree (BST) or not.

    • Check if the left subtree of a node contains only nodes with values less than the node's value.

    • Check if the right subtree of a node contains only nodes with values greater than the node's value.

    • Ensure that both the left and right subtrees are also binary search trees.

    • Traverse the tree in-order and check if the elements are in sorted order.

    • Use a recurs...

  • Answered by AI
  • Q2. 

    Binary Tree Conversion to Greater Tree

    Given a binary tree with 'N' nodes, transform it into a Greater Tree. In this transformation, each node's value should be updated to the sum of its original value and...

  • Ans. 

    Convert a binary tree into a Greater Tree by updating each node's value to the sum of its original value and the values of all nodes greater than or equal to it.

    • Traverse the tree in reverse inorder (right, root, left) to update the nodes' values.

    • Keep track of the sum of nodes visited so far to update each node's value.

    • Recursively update the node's value by adding the sum of greater nodes to it.

  • Answered by AI
  • Q3. 

    Check for Valid Parentheses

    You are given a string STR containing only the characters "{", "}", "(", ")", "[", and "]". Your task is to determine if the parentheses in the string are balanced.

    Input:

    Th...
  • Ans. 

    Check if the given string containing only parentheses is balanced or not.

    • Use a stack to keep track of opening parentheses.

    • Iterate through the string and push opening parentheses onto the stack.

    • When a closing parenthesis is encountered, pop from the stack and check if it matches the corresponding opening parenthesis.

    • If at the end the stack is empty, return 'YES' else return 'NO'.

  • Answered by AI
Round 2 - Face to Face 

(2 Questions)

Round duration - 60 mins
Round difficulty - Hard

2 Coding Questions were asked, both were of Medium to Hard Difficulty.

  • Q1. 

    Flatten Multi-Level Linked List

    You are given a multi-level linked list containing 'N' nodes. Each node has 'next' and 'child' pointers that may or may not point to other nodes. Your task is to flatten th...

  • Ans. 

    Flatten a multi-level linked list into a single linked list by rearranging the pointers.

    • Traverse the linked list and whenever a node has a child, flatten the child list and append it after the current node.

    • Update the 'next' and 'child' pointers accordingly while flattening the list.

    • Continue this process until all nodes are rearranged into a single linked list.

  • Answered by AI
  • Q2. 

    Rain Water Trapping Problem Statement

    Given an array/list ARR of size N, representing an elevation map where each element ARR[i] denotes the elevation of the i-th bar. Your task is to calculate and print ...

  • Ans. 

    Calculate the total amount of rainwater that can be trapped between given elevations in an elevation map.

    • Use two-pointer approach to keep track of left and right boundaries.

    • Calculate the trapped water by finding the minimum of left_max and right_max for each bar.

    • Subtract the current bar's height from the minimum of left_max and right_max to get the trapped water.

    • Keep updating the left_max and right_max as you iterate t

  • Answered by AI
Round 3 - Face to Face 

Round duration - 90 minutes
Round difficulty - Medium

Timing : It was late night.
How the interviewer was? He was very tired and I had to lead the discussion.
1 System Design Question was asked, had to provide - HLD, LLD, APIs.

Round 4 - Telephonic Call 

(1 Question)

Round duration - 60 minutes
Round difficulty - Medium

Timing : Afternoon
How was the environment? Home
Interviewer : Hiring Manager

  • Q1. Hiring Manager Discussion

    Discussed about past Projects, challenges faced, disagreements with manager, why looking for job switch,  leadership principle questions were asked.

Round 5 - Telephonic Call 

Round duration - 60 minutes
Round difficulty - Medium

Timing - Afternoon
How was the environment? Home
How the interviewer was? Very Helpful Interviewer
Bar raiser Round - Coding + System Design + Leadership principle

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in HyderabadEligibility criteria3+ years ExperienceAmazon interview preparation:Topics to prepare for the interview - DS/Algo, System Design, HLD, LLD, Behavioral questionsTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : 250 Leetcode ( Easy- 70, Medium- 150, Hard- 30) 
Tip 2 : Don't underestimate importance of good projects on your Resume.
Tip 3 : Be Confident.

Application resume tips for other job seekers

Tip 1: Resume should not be more than 1 page.
Tip 2: Have Keywords on Resume that match Job descriptions.

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

TCS user image Anonymous

posted on 16 Sep 2021

I appeared for an interview in Dec 2020.

Round 1 - Coding Test 

(1 Question)

Round duration - 30 minutes
Round difficulty - Medium

It was in the morning about 10:00AM-10:40AM. The platform used for this round was hackerrank. There are 15 MCQ's which cover portions of Aptitude, Data Structures, DBMS, SQL

  • Q1. 

    Minimum Operations Problem Statement

    You are given an array 'ARR' of size 'N' consisting of positive integers. Your task is to determine the minimum number of operations required to make all elements in t...

  • Ans. 

    Minimum number of operations to make all elements in the array equal by performing addition, subtraction, multiplication, or division.

    • Iterate through the array to find the maximum and minimum values.

    • Calculate the difference between the maximum and minimum values.

    • The minimum number of operations needed is the difference between the maximum and minimum values.

  • Answered by AI
Round 2 - HR 

Round duration - 15 minutes
Round difficulty - Easy

It was in the night around 7:00PM-7:20PM. Platform used for this round was skype. Interviewer was very serious while taking my interview.

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in DelhiEligibility criteriaAbove 7 CGPATata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, OOPS, Data Science, Aptitude, DBMSTime required to prepare for the interview - 3.5 monthsInterview preparation tips for other job seekers

Tip 1 : Practice as much as you can
Tip 2 : Try to get a good hold in Data Structures
Tip 3 : Do atleast 2 projects

Application resume tips for other job seekers

Tip 1 : It should not be too long or too short.
Tip 2 : Each skill should be mentioned properly.

Final outcome of the interviewSelected

Tell us how to improve this page.

SDE-2 Interview Questions from Similar Companies

Amazon SDE-2 Interview Questions
4.0
 • 14 Interviews
Flipkart SDE-2 Interview Questions
3.9
 • 4 Interviews
TCS SDE-2 Interview Questions
3.7
 • 3 Interviews
BYJU'S SDE-2 Interview Questions
3.1
 • 1 Interview
View all
Marketing Manager
4 salaries
unlock blur

₹15 L/yr - ₹16 L/yr

Restaurant Manager
3 salaries
unlock blur

₹3 L/yr - ₹4.3 L/yr

Accounts Manager
3 salaries
unlock blur

₹4.8 L/yr - ₹7.2 L/yr

Senior Accountant
3 salaries
unlock blur

₹5 L/yr - ₹6.8 L/yr

Explore more salaries
Compare Eat Repeat India Pvt Ltd Head Office with

TCS

3.7
Compare

Accenture

3.8
Compare

Wipro

3.7
Compare

Cognizant

3.7
Compare
Did you find this page helpful?
Yes No
write
Share an Interview