# LeetCode Handbook: All Problem Solution Index

## Overview

I have summarized the solutions to all LeetCode problems by organizing them into closely related topics of Backtracking, Greedy, DP, Search, Sum, Tree, Linked List, Array, Simulation, Math, Hash, Bit Operation and Other and give tree index page for quick references. I will update the content constantly.

## LeetCode All Problem Solution Index

LeetCode problem solutions are categorized by topics of Backtracking, Greedy, DP, Search, Sum, Tree, Linked List, Array, Simulation, Math, Hash, Bit Operation and Others and the reference index is given below

- “LeetCode All Problems Solution Index: Simulation, Math, Hash, Bit Operation and Others”
- “LeetCode All Problems Solution Index: Linked List and Array”
- “LeetCode All Problems Solution Index: Search, Sum and Tree Problems”
- “LeetCode All Problems Solution Index: Backtracking, Greedy and DP”

## LeetCode Special Topics: K Sum Problem Series

Originally I summarized LeetCode 2Sum, 3Sum, 4Sum, K Sum in Chinese in this post “Summary for LeetCode 2Sum, 3Sum, 4Sum, K Sum” under the red line there which got quite a lot of discussion. So I decide to rewrite another series of K sum problem analysis in English with the insightful comments integrated, some sophisticated issues resolved and some mistakes corrected. I hope these English versions of K sum problems could be more specific and concrete, and hopefully, those posts could give us more fruitful results and would be more helpful to more people (so those who cannot read Chinese could now read them). Of course, if you can read Chinese, the old Chinese one could also be a good one for your reference!

- 2Sum: Discuss the basic stuff including the sort and hash method, duplicates issues are raised up and discussed, Index Pair VS Value Pair are distinguished. Should be a good tutorial for beginners to explore K sum problem
- 3Sum: An old issue bothered me for quite a while about how to remove duplicates triplets in the results without using std:set is addressed and an extension for 3sum closest problem is given too
- 4Sum: Normal sorting approach reduced to 3sum and then 2sum is given and an even faster approach based on hash is discussed
- K Sum: generalize the 2sum, 3sum, 4sum problems into K sum, and the source code of recursive implementation is given which I consider quite elegant. Lower bound and related papers of proof for K sum is discussed too

## Summary

Solutions to all LeetCode problems are summarized into closely related topics of Backtracking, Greedy, DP, Search, Sum, Tree, Linked List, Array, Simulation, Math, Hash, Bit Operation and Other and I give tree index page for quick references. Special topic of K Sum problem series is also given too. I will update the content as well as these reference pages constantly, feel free to lave any comments.