y-t99 / algo

labuladong/fucking-algorithm practice record.
MIT License
0 stars 0 forks source link

algo

Cycle Detection: Floyd’s Algorithm save Linked List Cycle & Linked List Cycle II.

a + b = b + a save Intersection of Two Linked Lists

c = a + b save Remove Nth Node From End of List

a > b & b > c => a > c save Merge Two Sorted Lists

b > c, a + b < d => a + c < d save Two Sum II - Input Array Is Sorted