Leetcode June Challenge - Day 5

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

Leetcode June Challenge - Day 4

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

Leetcode June Challenge - Day 1

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.

Leetcode June Challenge - Day 2

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.

Leetcode June Challenge - Day 3

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: