Blind 75 - Reverse LinkedList
Similar to swapping two numbers. Start with prev as null and current and keep swapping next. Return prev because that's the last value.
Similar to swapping two numbers. Start with prev as null and current and keep swapping next. Return prev because that's the last value.
Placeholder
Loop twice.<br>first right to left while multiplying.<br>Then second left to right while multiplying.<br>This can be done in a single array and one extra product variable
Create a set and put items in one by one while checking if `num` is already there.
compare the count of letters in each word and put group them in a map
count all numbers. sort. and return top k. Use streams to make it cleaner. or use bucket sort.
check if the length is the same.<br> find the difference in the count of letters in both numbers.<br> since there are only 26 letters, you can count in a single int array of 26. <br>index = char - 'a'
Make a map of item and index. Check if target - currentItem exists.