edited by
1,000 views

1 Answer

2 votes
2 votes
Gate(n)=gate(n-1)+1

Space complexity is length of longest branch in tree..

Gate(n)-->gate(n-1)+.......gate(1)

So space complexity =O(n)

Related questions

2 votes
2 votes
1 answer
1
1 votes
1 votes
2 answers
4
Akash Kumar Roy asked Apr 26, 2018
3,944 views
what is Space complexity of Huffman coding?