Data structures Interview Questions | Glassdoor

Data structures Interview Questions

116

interview questions shared by candidates

Data structures Interview Questions

What is a situation in which you have been challenged by a student and how did you meet that challenge and learn from it for future lessons

2 Answers

I talked about a student with autism I had that used to spit on me and other paras every time we tried to get him to learn and do work. I explained the many tactics we came up with and tried as a team and the many ways I tried on my own to get his behavior to change. Until we finally came up with a tactic of reward and recoil that got him away from spiting and excited to do work.

I had a student who would keep talking even when she wasn’t supposed to. I tried changing her seat frequently, talking to her parents then finally settled on having her take a paper and write out what’s on her mind in the back of the room which seemed most effective. I also found that letting her help with tasks worked

Given a string of words and a maxWidth, write a method that inserts new lines where appropriate to perform a word-wrap. (Wrap on word boundaries, assume " " is fine). Now, how does your implementation handle string with multiple spaces between words ... Are those extra spaces lost or preserved?

2 Answers

Given a histogram data representation, how would you find the adjacent bars/columns that collectively yield a rectangle with the largest coverage area.

1 Answer

Write a function that given a sequence and a number b between [-10,10] return a new sequence. Sequences are generated by this: http://en.wikipedia.org/wiki/Look-and-say_sequence a number b if equal to 0 the function will return the input sequence Valid sequences: 1 11 21 1211 111221 ... Example: input: 1211, +1 output: 111221 Example: input: 111221, -1 output: 1211

3 Answers

main() { A() C() } A() { B() } B() {} C() {} input: t1 main enter t2 A enter t3 B enter t4 B exit t5 A exit t6 C enter t7 C exit t8 main exit output: main (t8-t1) A (t5-t2) B (t4-t3) C (t7-t6) Write a function that given the input will create the output

1 Answer

All the questions were from data structures, algorithms, and programming

1 Answer

Given a binary min heap, insert a new member.

Hash table lookup.

1 Answer

Given a website with static html pages and a list of words to censor, mark all pages that have a censored word. What is the best O-notation you can come up with?

110 of 116 Interview Questions