Software development engineer Interview Questions in Boston, MA | Glassdoor

Software development engineer Interview Questions in Boston, MA

123

software development engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Given a binary tree with the usual left and right pointers on each node, and additionally a parent pointer, make an algorithm to discover the closest ancestor to 2 nodes on the tree.

7 Answers

Time complexity is : O(max height of binary tree) public void findCommonAncestor(Node current,int a,int b){ if(current.getKey() a && current.getKey()>b){ findCommonAncestor(current.getLeft(), a, b); }else{ System.out.println(" least common ancestor is "+current.getKey()); } }

analog76, your solution is not complete.

@clusterfudge, what do you mean by incomplete? Can you be more precise?. Common ancestor - first encounter of node value between a and b. Otherwise either you go left or right node.

How would you code up a custom rectangle detector?

5 Answers

Given the word "HEAD" and the word "TAIL," write code and/or describe using computer science algorithms how you would transform from the word HEAD to the word TAIL. Each change must be by only one letter, you cannot change the letter in a given position twice, and each new word must be a valid word.

3 Answers

A disc is spinning on a spindle - you don't know which way. You are given a set of pins - describe how you would use them to determine which way the disc is spinning.

4 Answers

write a function that takes in an int and returns a string that would be how one would say that number (ex: 123 -> one hundred twenty three; 50019 -> five thousand nineteen).

3 Answers

Given a sentence input : helloworld output: HelloWorld YOu should make use of a dictionary available with you. Capitalize the dictionary words in the sentence

4 Answers

I was told a coding question. Q: Given a list of words for example : cat,bat,rat.... and given a query which has a special character '.' which can be represented as any alphabet between 'a-z'. Write a function which gives true as output if the the query is in the list of words. Example: List of words: cat,bat,rat,cct,cut Query 1: c.t Output 1 : true Query 2: c.. output 2 : true

5 Answers

Presented with scenarios, and ask to offer solutions. Mostly interested in your approach, not the solution.

1 Answer

Same as previous reviewers. Knew I wasn't going to get the job based on that.

1 Answer

To design a system in c++/java which reads data files and outputs some analytical questions. it was an offline coding round and the ask was to make it faster and scalable.

1 Answer