Did my student pass my coding interview? (Very easy algorithm but tricky)

23 Oct 2024 · 21 min
21:12

Phil interviews Minnie on finding the most frequent number in an array, with ties going to the larger number. Minnie plans a frequency counter but hits a snag: object keys become strings. Phil walks through the bug and shows an alternate approach using Object.values and Math.max.

Questions this video answers

Phil Choi

Minnie

Implement a function that returns the most frequent number in a non-empty array; if there's a tie, return the larger number.

No — the transcript states no empty arrays will be given.

October 23, 2024

Chapters

More from Phil

youtube.com

How to Get Hired as a Software Engineer in 2025 (The ONE project rule)

1y ago
youtube.com

How to Stand Out In Tech in 2025 with Domain Knowledge (Stop Just Coding)

1y ago
youtube.com

day in the life of a software engineer | 5 hour productivity | building my dev agency 🔥

1y ago
youtube.com

I was a failure in tech until THIS happened

1y ago
youtube.com

day in the life of a software engineer | 3 hour productivity | coding my 6-figure community startup

1y ago
youtube.com

IT SUCKS but this made me $300k/year in tech EASY

1y ago
youtube.com

day in the life of a software engineer | 5 hour productivity | coding our sns startup app LFG

1y ago
youtube.com

Your First AI Agent in 20 minutes (Real World Use Cases)

1y ago
youtube.com

Is it possible to break into tech in less than 135 days?

1y ago
youtube.com

day in the life of a software engineer | 5 hour productivity | creating apps that makes big money

1y ago
youtube.com

How I Would Learn JavaScript If I Could Start Over

1y ago
See all content