JavaScript for Competitive Programming
summary
JavaScript runs common contest tasks about 5x slower than C/C++ (example: 25,000th prime) and its Number type overflows factorials beyond ~170 → Infinity, so a string-based big-integer using digit-by-digit multiplication is built and validated on HackerRank test cases. Memory pain shows when 1,000 doctors produce ~7,000 JSON objects for weekly slots, so availability is packed into 24-bit binary integers per day, drastically cutting objects and RAM and improving lookup and transmission performance.
AI-written summary · about
chapters (10)
- 0:00Start
- 2:00Top 10 Most Popular Programming Languages
- 2:11Most Popular Programming Languages
- 2:51Speed
- 3:16Language Limitations
- 3:59Why You Should Care about Committed Programming
- 5:46Practical Example
- 6:04Factorial Example
- 16:39Javascript Has Limitations
- 16:56Invent New Data Types
related talks
39mHow much performance can you get out of Javascript?
17mJavaScript and mathematical computing across servers and clients
36mJavaScript Puzzlers
46mHow much performance can you get out of JavaScript?
29mExtreme JavaScript Performance
25mLet's go big
52mJavaScript at the Speed of Light
34mJavaScript is an Oddball
