Problem Solving Techniques
Last updated
Was this helpful?
Last updated
Was this helpful?
Declare two pointers, one is faster (increment by 2) compared to slower (increment by 1)
Find the centre element of a LinkedList
When faster reaches the end node, slower one will be at the mid node
Check if a LinkedList is cyclic or not
If cyclic, then, at one point in time slower and faster pointers will be at the same point
Using while/for loop or using recursion
FEW DEFINITIONS:
Anagram: A word or phrase that is made by arranging the letters of another word or phrase in a different order
<< and >>
Mathematical Solution is brilliant: