LeetCode's system is adapted from the Open Codeforces rating system. Elo was designed for two players, so a contest with tens of thousands of people is handled by treating it as everyone playing everyone else at once. It runs in three steps.
1. Your expected rank. For each other contestant, the probability they finish above you is 1 / (1 + 10^((your_rating − their_rating) / 400)). Add those probabilities across the whole field and you get the position you were expected to take. A 1500-rated player in a field of 26,000 is expected to land close to the middle.
2. The midpoint between expectation and reality. The system takes the geometric mean of your expected rank and your actual rank — the square root of the two multiplied together. This is what stops one exceptional or disastrous contest from moving you the whole way.
3. A fraction of the gap. It finds the rating that would have been expected to finish at that midpoint, then moves you part of the way there. That fraction starts near one half and decays toward about two ninths as you attend more contests, which is why new accounts swing hard and settled ones crawl.
The practical consequence is the one most people find counter-intuitive: your rating change has almost nothing to do with how many problems you solved. It depends on your finishing rank relative to the rank your current rating predicted. Solving three problems is a large gain at 1400 and a loss at 2200.