Interview Question for SDETs


Country: India
Interview Type: Phone Interview




Comment hidden because of low score. Click to expand.
0
of 0 vote

since everybody can do above, I will just write the prove :-)
prove by induction: base case ''; '(' ')'
which class of grammair: you can write a BNF production like
programm = {expression}
expression = "(" expression ")" | "(" ")"

{prodcution} means n-times, where 0<=n
2nd prove, just write a dump parser like a LL1 or recursive descent

so it's at most a context free language, question is if its a regular grammar as well (finite automata) ... it's too long, but I think a regular automata can't parse it (not to be confused with modern regular expressions...) could somebone comment on the last please.

- Chris October 19, 2016 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

You are almost right Chris brackets matching are not regular.
They are (Non deterministic) Context Free at best.

And yea I give n take interviews fairly regularly.
Appeared for : 50+ , Taken : 600+. There were days where I used to take 10 interviews a day, and there are days where I used to appear for 3 full panel interview a day. It is a fun activity.

- NoOne October 20, 2016 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More