• Did some leetcode problems to practice.
    • When doing something with only two elements (like check to see which two items in an array add to a target sum), you might be tempted to check the permutations of the remaining array, with each iteration. This is not the fastest. You can get it down to O(n) time by storing a complement map as you move through the array, then you can compare each to the complements to see if it fits.
    • Pretty much finished all my specific prep for interviews. Now it’s just going through the generic problem repositories, practicing a few each day:
      • Hackerrank. Leetcode. Careercup (CtCI). Glassdoor. Youtube.
    • So far I think I like leetcode the best.
    • 5 directly-interview-relevant docs in gdrive. 1 for general process/approach, and then 4 from book notes:
      • Structure and Interpretation of Computer Programs, Algorithms and Data Structures, Programming Interviews Exposed, Cracking the Coding Interview.
    • Reminder of great youtube channel for interview questions: https://www.youtube.com/channel/UCNc-Wa_ZNBAGzFkYbAHw9eg/videos.
    • Alpha = how much you outperform a generic benchmark, usually the S&P500. If that rises 5% in a year and you rose 15%, your alpha is +10.
    • Beta = how much more volatile than a generic benchmark. If your stock gained 3% in a day and the S&P500 lost 1%, your beta is -3.
    • Manacher’s algorithm is O(n) for longest palindromic substring: https://en.wikipedia.org/wiki/Longest_palindromic_substring. Fantastic.
    • Longest common subsequence = a common problem. Look it up.
    • When palindromes are mentioned, you can reverse the string and then it becomes a longest common subsequence problem (check indices tho).
    • An 8yr youtuber who reviews toys made $26m last year.
    • Helped dad backup/update his iphone 6.
    • Did the amazon coding interview (90m). Each question basically has 20 unittests, 2 of which are shown and 18 are hidden.
      • On the practice exam, I got 20/20 and 20/20, and finished in 35m.
      • On the real exam, I got 19/20 and 2/20, and finished in 90m. The first one was good, but something was up with the second one. It passed both visible testcases and then showed “passed 0 of 18 for the invisible testcases” – not sure what happened, but my program was correct so who knows.
      • Was also possible to have another computer googling the problems and copying the answers. I did it honestly, so I worry about the bar I’ll be compared to. I much prefer a voice/video call, for both authenticity and the ability to prove comprehension verbally.
    • Went to sunnyvale, madras and fam.