Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A follow up, if ES6 JS doesn’t come easy to you — pick a language you like best and look for its equivalents to Set, Map, .filter (or select) and .map (or collect). Bonus tip, look for .find or .first, to short circuit looping and stop at the first thing that matches. Yes, you can memorize for loops or why one thing is more efficient than another, but if you start with Set and Map where each makes sense, you’ll solve 80-90% of algorithm questions pretty easily and usually in a way that’s straightforward to read and understand later, especially if you start naming some of your functions to make them a bit easier to read. (Like naming selectors in Redux...)

If writing SQL as part of a quiz, learn the different joins because usually the question is worded in a way where picking the correct join will deliver huge performance benefits by reducing how much data you’re going through or making things more efficient than looping through multiple subqueries. Left vs Inner vs Right vs Outer vs Cross... remember that the less data the server has to go through (the fewer records in the earliest sub query), the faster everything will run, in these quiz scenarios. Yes, in real life how you store data matters, what you index, but it’s rare you’ve any control over the index or schema in these tests.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: