Reverse a binary tree in C# for a job interview (Updated)
September 11, 2021
7,209
284
30
4.36%
Search the Record
IndexedEvery word spoken in this episode is indexed. Type any phrase to jump straight to the moment it was said.
Type any word or phrase that may have been spoken. Click a result to seek the player to that exact moment.
Try a name, a topic, or a quoted line
Ryan McBeth Episodes Around September 11, 2021
See what was published immediately before and after this episode.
15:13Now PlayingReverse a binary tree in C# for a job interview (Updated)
YouTube Description
as posted by the channelReversing a binary tree is so easy that even Joe Rogan can do it!
It's one of those questions that is asked a lot in a job interview because senior developers want to see how you work your way through the problem.
Just follow the algorithm: RE-BESII.
RE - Write the REverse Method
B - If both the left node and right node are null, return.
E - Else
S - Swap the nodes
I - If the left node is not null, send the left node to reverse.
I - If the right node is not null, send the right node to reverse.
And that's it! That's all you have to do.
The code for this can be found at:
or
ryanmcbeth.com
Links & Promotions
Guests & Subjects Covered
Sentinel Indexing in Progress
Metadata and chapters are available. Claim extraction for this episode is pending.
All video content is delivered via YouTube embedded players in accordance with the YouTube Terms of Service. Sentinel provides research tools that promote discovery and accountability across political media.









