Challenging algorithms and data structures every programmer should try
Bored of algorithms? Here are my recommendations that are exciting, understandable, and sometimes even useful!
Topics /
The most popular blog posts about math & algorithms on Hacker News. 2,391 posts.
Bored of algorithms? Here are my recommendations that are exciting, understandable, and sometimes even useful!
Cosine similarity - the duct tape of AI. Convenient but often misused. Let's find out how to use it better.
This post is about an idea I had around 1997, when I was 16 years old and a freshman computer-science major at Cornell. Back then, I was extremely impressed by a research project called CLEVER, wh…
How to test for leap years (until year 102499) in the proleptic Gregorian calendar with just three 32-bit instructions, with detailed explanation of the bit-level tricks.
[This is a guest post by Grant Sanderson. This blog post was initially written in a different file format and converted using AI. — T.] A sentiment echoing throughout the mathematics communit…
Conceptualizing functions as infinite-dimensional vectors lets us apply the tools of linear algebra to a vast landscape of new problems, from image and geometry processing to curve fitting and machine learning.
The most common question students have about mathematics is “when will I ever use this?” Many math teachers would probably struggle to give…
Excited to announce that my technical paper “ N-Dimensional Rigid Body Dynamics ” was accepted to SIGGRAPH 2020 ! Very proud to present research developed for 4D Toys & Miegakure at such a prestigious conference.
There are a whole bunch of popular interview questions that can be solved in one of two ways: Either using common data structures and algorithms in a sensible manner, or by using some properties of...
Linear algebra is to machine learning as flour to bakery: every machine learning model is based in linear algebra, as every cake is based in flour . It is not the only ingredient, of course. Machine learning models need vector calculus, probability, and optimization, as cakes need sugar, eggs, and butter. Applied…
Intel’s manuals for their x86/x64 processor clearly state that the fsin instruction (calculating the trigonometric sine) has a maximum error, in round-to-nearest mode, of one unit in the last place…
When seeing the phrase “dynamic programming” in an algorithms class or leetcode study guide, the first question people ask is “what does ‘dynamic’ mean in this context?”.
Fourier transforms are a tool used in a whole bunch of different things. This is a explanation of what a Fourier transform does, and some different ways it can be useful.
RSA encryption allows for anyone to send me messages that only I can decode. To set this up, I select two large random primes $latex p$ and $latex q$ (each of which is hundreds of bits long), and r…
Say we have some things, and we want to be able to store and look them up in order. We could just put them in a big sorted array:
Update: This result appeared in the proceedings of CT-RSA 2023. A preprint is available.
When does our taste in music stagnate?
It's not the reason you think. No, it's not that reason either.
The Fibonacci series is a famous example of an object with a simple mathematical description, but a nearly inexhaustable list of bizarre and complicated properties. Originally, the series was described by Fibonacci in the 15th century in connection with the following problem:
Why don’t photographs make distant objects big enough?
Dynamic programming has a reputation as a technique you learn in school, then only use to pass interviews at software companies. Indeed, most developers do not regularly work on problems where dynamic programming is needed. Ultimately, dynamic programming is a technique for efficiently solving problems that can be…
More Updates (Oct. 12): Jeffrey Ketchersid has used Claude Code agents to show that BusyBeaver(10) exceeds Graham’s number, beating the previous best result that BB(13) does so. In response t…
A taste of Lean.
[This is a guest post by Amit Sahai. This blog post was initially written in a different file format and converted using AI. — T.] When I was an undergraduate student, I remember talking with…