First commit
If, Permutation, DP, List
Haven't solved: GrayCode. Cannot use import: MergekSortedLists
Add a solved one (do not add none solved one next time)
the key of list nodes are in their next
Super elegant answer by user20
Take care the initial condition for the while loop
ANSWER: user20
TLE: move folding statement out of the double for loop then AC
TLE: Change a for loop to hash table then AC
AC: reindexing in-place
AC: changing boundary condition
AC: figure out the rule of patten is graycode(n) = 1+graycode(n-1).reverse()
AC after considering so many conditions. The code is ugly. Look for a better version
Update O(n) storage
AC: special case
AC: binary search with boundary condition
AC: Space(1)
AC: statement checks
AC: reverse and find, special case