JUSPAY interview question

Tree Traversal without extra space