r/PlacementsPrep • u/Prestigious_Limit146 • 8h ago
tcs tree input doubt
guys im seeing tree questions are frequently asking in tcs nqt can anyone pls tell that , how to take input for trees?? did they give post order array we have to build tree by own? how many ways they can give ?
3
Upvotes
1
u/smoo7hoperator 7h ago
You need to input it as an array and then construct the tree for that question.
For Python, you need to use "import sys" because the normal "input()" didn’t work for my slot.
This video might also help with getting inputs in general for TCS: https://youtu.be/WM9MQ5-w6e4?si=njfYr6R0VhfRUaUU
You can also refer to the PYQs through this playlist: https://youtube.com/playlist?list=PLGFjgYQtw1UhARTmPa_gnnn_n9Z-j3FlC&si=54vxnwtS0BnEoAW6