Google Interview Question for Software Engineers
- 3of 3 votes
1 year exp. Interviewed at Cambridge, MA- aonecoding July 11, 2017 in United States
LC304. Follow-up: given a char stream instead a string as the input, get the longest substring with at most K distinct characters.
Find out the area of a number of squares on a plane, an advanced version of LC223.
Had no clue on that problem at all so the interviewer kindly gave another one LC305.
Similar to LC393 but the interviewer made a slightly different rule for encoding.
Follow-up: decode with utf-16. It took quite a while for me to understand the rules.
Card game rule: the hand is drawn from a pack of cards (no jokers).
Play cards ONLY when they are
1. 3 of a kind ('AAA' ) or 4 of a kind('AAAA’).
2. a straight flush of 3 or more cards('JQK' or 'A23456...' in the same suit).
Find out whether the player is able to play the whole hand given.
e.g. [Spade A, Spade K, Spade Q, Diamond Q, Heart Q] return false.
[Spade A, Spade K, Spade Q, Diamond Q, Heart Q, Club Q] return true.
| Report Duplicate | Flag | PURGE
Google Software Engineer Algorithm
Interview Type: Written Test
Open Chat in New Window