I’ve always wanted to learn recursion but never actually went beyond fibonacci number and factorial, with lot more time on my hands due to lockdown tried to solve a few not so trivial problems.

**Permutations**(https://leetcode.com/problems/permutations/)

given an array [1,2,3] find all permutations[

[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]

- The idea is quite simple but let me explain how to think through this problem
- Start with an empty array [ ]
- Now _ _ _ in the first spot I can place any of the 3 numbers, I start with number 1.
- 1 is rooted to the first…

Programming, Soccer, gaming, photography, food and drinks 😊