Round 1
Questions:
- Given s={a, b, c}. Print all powersets.
- Expected output: {{}, a, b, c, (a, b), (a, c), (b, a), ...}
- Minimum Remove to Make Valid Parentheses
Candidate's Approach
- For the first problem, the candidate used a nested loop to append each character/combination to generate the powerset.
- The candidate did not utilize bit manipulation and did not consider the mathematical aspect of the output being 2^n.
Interviewer's Feedback
The candidate expressed that if they were the interviewer, they would say "no hire."