Engineer Developer Interview Questions

467,806 engineer developer interview questions shared by candidates

1st phone: Anagram problem, merge two sorted linked list, and the last ten minutes talked about LRU. 2nd phone: The problem was easy to understand, but I believe the solution would be really long. I didn't get it right, so failed on here. Given a string, parse it and return a string array. It's like a tokenizer, but the rules are too... For exmple, string="abc(edf)hij{klmn}opq[rst]uvw" The delimitors are (), {}, []. They are in pair. So output array: ["abc", "edf", "hij", "klmn", "opq", "rst", "uvw"] That's the rule 1. The rule 2 is, if any two consecutive "(" means escaping, that is "((" is actually output char "(". It's not part of the delimitor. Similar to ")", "{", "}", "[", "]". abc(e))df) => ["abc", "e)df"], since the "))" outpus ")". Rule 3: if "{" is inside a delimitor pair (), then "{" isn't part of the delimitor. Output it as is. abc(e{df}}g) => ["abc", "e{df}}g"] So, parse the given string and assume the given string is always valid and parsable. I think state machine is a good direction. But I didn't finish it.
avatar

Software Engineer

Interviewed at Hulu

4.2
Apr 23, 2014

1st phone: Anagram problem, merge two sorted linked list, and the last ten minutes talked about LRU. 2nd phone: The problem was easy to understand, but I believe the solution would be really long. I didn't get it right, so failed on here. Given a string, parse it and return a string array. It's like a tokenizer, but the rules are too... For exmple, string="abc(edf)hij{klmn}opq[rst]uvw" The delimitors are (), {}, []. They are in pair. So output array: ["abc", "edf", "hij", "klmn", "opq", "rst", "uvw"] That's the rule 1. The rule 2 is, if any two consecutive "(" means escaping, that is "((" is actually output char "(". It's not part of the delimitor. Similar to ")", "{", "}", "[", "]". abc(e))df) => ["abc", "e)df"], since the "))" outpus ")". Rule 3: if "{" is inside a delimitor pair (), then "{" isn't part of the delimitor. Output it as is. abc(e{df}}g) => ["abc", "e{df}}g"] So, parse the given string and assume the given string is always valid and parsable. I think state machine is a good direction. But I didn't finish it.

Viewing 2051 - 2060 interview questions

Glassdoor has 467,806 interview questions and reports from Engineer developer interviews. Prepare for your interview. Get hired. Love your job.