29

interview questions shared by candidates

Sort: RelevancePopular Date

Mar 21, 2010
 You have a genealogy: 1) Describe a data structure to represent it. 2) Given any two people within the genealogy, describe an algorithm to determine if they share a common ancestor. You just need to return true/false, not all ancestors.6 Answers1) Each person is represented by an object, with two pointers: "mom" and "dad" that point to their respective parent. 2) Choose one of the two people arbitrarily. Perform depth-first traversal and create a set of ancestors reachable from that person. Perform depth-first traversal on the 2nd person and for each node visited check if they are in the set; if yes, return true. Use a hash-set for best performance.calculate the height of person 1 in the tree, calculate the height of person 2. Move them up to be the same height. Then keep going until they intersect.@user: Its not a tree. A genealogy is a graph due to the fact that you have maternal and paternal trees intersecting. Therefore there is no root from which to calculate height.Show More ResponsesIf you've optimizing for worst case, hash set is O(n) for search. You'd do better in worst case with a sorted structure. You'd do even better if you store a "visited" flag at each node. Alternately you can number each node and keep an array of visited flags. since depth first seach might find a longer link through dad before checking mom, you're better off with breadth first search. Anything reachable in one hop would be seen before anything reachable at best in 2 hopsYes. Good points. The second traversal should be breadth first. The first traversal it doesn't matter, as you need to visit all ancestors anyways. The use of a visited flag is a good optimization. Based upon the way the question was worded, it wasn't clear if you could design the data structure to optimize the algorithm or not.I belive both the first and second should be BFS traversals

### Senior Consultant at Sogeti was asked...

Jan 31, 2011
 What is SDLC4 AnswersThey are looking for someone who not only knows what SDLC is but someone who's got experience.A cycle of planning, analysis, design, implementation, testing, deployment, and maintenance.System Design Life CycleShow More ResponsesSoftware Development Life Cycle

### Computer Programming at Pyramid Solutions was asked...

Dec 16, 2010
 What is your favorite technical acronym?2 AnswersThis question just caught me very off-guard. I was not expecting a question like this at all, and thus had no semblance of an answer prepared.WYSIWYG

### Programmer at SUPERVALU was asked...

Jan 18, 2011
 why i wanted to do what i interviewed for. Would I fit in. How much experience and what did i know about the job. 1 AnswerI had 11 years prior experiance as a user of systems I was applying for.

### Software Development Engineer I at Amazon was asked...

May 21, 2012
 How would you go about designing an university? What classes and methods will it have?1 AnswerStart thinking from department wise - lets assume you work in computer science department which just have teaching and reseach operations Depart { Employment - Professers, Research Professors, student worker, graduate assistant, other staff; Operation - building operations cost, research funding, events, misllenous courses - types of major, minor and researcher_offered - Number_of_courses_offered } now once we have this generic skelleton class designed here we can figure out what is most common in each department Lets say Employment and Courses (as not each department do research) So make abstract class on the top which everybody inherits Class University { private double funding; private string courses; private double course_cost; int virutal cal_funding(); int virtual cal_courses(); int virtual cal_course_cost(); } this is abstract class inherited by all department now (pretty vauge yes object oriented) class Computer_science inherits University { redefine each function here virtual void cal_course () { return - Number_of_courses_offered ; } This is how you can divide the problem, I am giving you skeleton but depending on discussion I can modify this to large extend, delving more into details

### Senior User Interface Designer at Symantec was asked...

Jan 26, 2012
 If you had a design goal that required more technical information in order for you to continue, how would you proceed?1 AnswerI would communicate directly with project engineers and/or other team contributors. I would discuss specific parameters and challenges, so as to arrive at a point of consensus, and resolve how to move forward with the specific design goal.

### Intern at Exelis was asked...

Sep 1, 2010
 Do you know anything about Spectrum Management?1 Answeryes, explained what I knew

### Software Development Engineer at Amazon was asked...

Mar 29, 2012
 Design (in Object Oriented manner) a restaurant reservation service. No coding necessary beyond class names and method names and rough description of how they work. Then design the SQL database for this system (table names, columns and foreign keys)1 AnswerThis wasn't very difficult

### Software Engineer at Strata Decision Technology was asked...

Sep 24, 2011
 Design an elevator and chess game.1 AnswerBegin with objects and define attributes and functions.

### Technical Intern - Testing at Intel Corporation was asked...

Feb 27, 2013
 Name some software design patterns?1 AnswerReference Design Patterns: Elements of Reusable Object-Oriented Software by the Gang of Four
110 of 29 Interview Questions