Google Interview Report
- 0of 0 votes
Answers
- ajay.raj March 01, 2018 in United StatesGiven a binary tree, output the maximum EVEN sum along any path 10 / \ 2 5 / \ \ 1 101 13 Maximum even sum = 101 +2 +10 + 5 = 118
| Report Duplicate | Flag | PURGE
Google Java Developer - 0of 0 votes
AnswersCSS colors can be defined in the hexadecimal notation "#rgb", a shorthand for "#rrggbb". For example, "#03f" is equivalent to "#0033ff". Suppose the similarity between two colors "#abcdef" and "#ghijkl" is defined as (-(ab-gh)^2 - (cd-ij)^2 - (ef-kl)^2), write a function that accepts a color in the "#abcdef" format and returns a "#rgb" color that is most similar to the input. For example, given "#09f166", "#1e6" should be returned.
- ajay.raj March 01, 2018 in United States| Report Duplicate | Flag | PURGE
Google Java Developer - 0of 0 votes
AnswersDesign a dictionary with historical records
- ajay.raj March 01, 2018 in United States
t0: hdict = HistoricalDict ()
t2: hdict.set ('foo', 1)
t4: hdict.set ('foo', 2)
t5: hdict.get ('foo', t5) -> 2
t6: hdict.get ('foo', t3) -> 1
t7: hdict.get ('foo', t0) -> None| Report Duplicate | Flag | PURGE
Google Java Developer