Brackets and Nesting are almost the same. The only different is space complexity.