Problem: LeetCode June Challenge - Day 5 Ideas: In order to do it randomly, just keep a cumulative array built from w.

Problem: LeetCode June Challenge - Day 4 Ideas: Swap every character with it’s opposite.

Problem: LeetCode June Challenge - Day 1 Ideas: The problem is really simple, you just need to swap left and right for every node, as a tree is inverted iff every subtree is inverted.

Problem: LeetCode June Challenge - Day 2 Ideas: Since you are at the tail, you can copy the next node in the current one, and delete the next one.

Problem: LeetCode June Challenge - Day 3 Ideas: Again a very simple problem, you need to pick n people for each city, so for every person we have: