A version that works for branching factor = 3. Let's hope it works for all N. By mathematical induction or something.
Merge branch 'master' of https://github.com/akshaan/Databases-Project2

Merging our changes