Software Development Engineer(SDE) Interview Questions | Glassdoor

Software Development Engineer(SDE) Interview Questions

19

Software development engineer(sde) interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

[Round 1] Find loop in a linked list

3 Answers

Answer : If he means a boolean function to see if there is a loop in the linked list or not, then the answer is to use two pointers (slow and fast). "slow" walks one step every time and "fast" walks two step every time , if you reach null with fast pointer , then there is no loop , else if the fast and slaw pointer meet then there is a loop. if he means find the begin node of this loop (loop node), then you will write some extra code. you now get the node where "fast" and "slow" pointers meet in. then, arithmetically, the distance between that node and the "loop node" is equal to the distance between the head of the linked list and the "loop node". what we can do is after the slaw and fast pointers meet , fast pointer will point to the head of the linked list and both the slaw and the fast pointers will continue with speed equal to one step every time until they meet. the "loop node" is the node they met in.

There is a blog discussing this problem: http://codercareer.blogspot.com/2012/01/no-29-loop-in-list.html Additionally, it's the 16th problem in the book . You may get detailed analysis about this problem in the book.

C# Implementation http://arturodelosangeles.com/2015/01/27/find-loop-in-a-linked-list/

Write a function to remove duplicates from a list of characters.

1 Answer

[Round 3] 1) Check for BST property 2) Arrange two sorted lists to get a sorted list without duplicates and another list with the duplicates.

1 Answer

unexpected: The Recruiter asked how many lines of code I have written in my biggest project

1 Answer

Various delegate types and when and where to use

1 Answer

They'll usually ask you questions about linked lists, binary trees, recursion, memory allocation, etc.

1 Answer

Design / implementation considerations while implementing a service talking to database which is deployed on Premise Vs Azure.

1 Answer

Given a dictionary and a function that returns if a work is in the dictionary, create a function that takes a non-space delimited string and outputs the same string with words separated by spaces.

1 Answer

[Round 2] 1) Implement Stack 2) Implement Factorial

1. LCA in a binary tree 2. Find the medium of two sorted array 3. Find a number in a partially sorted matrix (the matrix is sorted column-wise and row-wise)