Recurse Center Week 4: Thu Jan 25
Did a bit of a reassessment the last few days and shifted my goals somewhat:
New goals!
- do a problem from grind 75 every day
- sign of success: be able to do medium-level problems consistently within the recommended time limit
- also want to read and practice all of the entries from the techinterviewhandbook algorithms cheat sheet, be able to summarize each one
- learn a new stack: react with typescript, django, firebase, AWS
- sign of success: contribute some significant improvement to an existing app with that stack
Connecting
- went to checkins
- officially extended to a full batch!
- took a walk with P.B.
- had a lunch chat with Alex and Sareena, discussed NYC vs. Seattle
Leetcode: Majority Element (easy)
- JS basic object implementation
- first pass in under 20 minutes (yay!)
- first pass was O(n) space (I think?) (6%) and O(n) time (16%) (not great)
- learned differences between JS objects and Maps:
- from Geeks for Geeks:
- In Object, the data-type of the key-field is restricted to integer, strings, and symbols. Whereas in Map, the key-field can be of any data-type (integer, an array, even an object!)
- In the Map, the original order of elements is preserved. This is not true in case of objects.
- The Map is an instance of an object but the vice-versa is not true.
-
JS Map() implementation (second attempt)
- significantly better (66%) time
- slightly better space (8%)
-
seek out even better implementations?
Went to presentations!
- 3 random takeaways:
- MTA API only accounts for 2 directions, which leads to some ambiguity, which mirrors my real life confusion (I can't tell you the number of times I've gone the wrong way on the G after transferring from the C at Hoyt-Schermerhorn lolol)
- there's a whole world of local-first apps, seems cool: localfirstweb.dev
- TypeScript playground: a place to explore differences in transcompilation into different versions of JS