Click here to Skip to main content
15,897,518 members

Survey Results

Can you, without looking it up, write code to convert any Binary Search Tree to a Balanced Binary Search Tree?

Survey period: 7 Jun 2021 to 14 Jun 2021

The real question is: Is this important these days? Esoteric knowledge we need for interviews, or basic skills we should know cold?

OptionVotes% 
Yes I can, and every developer should be able to as well131.69
Yes, I can, but it's not really that important384.94
I did it for an interview question and have never done it since.151.95
I knew how to once, but the details are fuzzy13918.08
Maybe, probably, not 100% sure9712.61
No,. I don't think I could27836.15
I don't even know what a Binary Search Tree is, let alone a balanced one18924.58



 
GeneralNo. Give me an expected result Pin
den2k886-Jun-21 20:45
professionalden2k886-Jun-21 20:45 
GeneralNever PinPopular
Threepwood19736-Jun-21 20:09
professionalThreepwood19736-Jun-21 20:09 
GeneralRe: Never PinPopular
jpoggio6-Jun-21 23:05
jpoggio6-Jun-21 23:05 
GeneralRe: Never Pin
Doug Domeny7-Jun-21 8:32
professionalDoug Domeny7-Jun-21 8:32 
PraiseRe: Never Pin
SeeSharp28-Jun-21 4:00
SeeSharp28-Jun-21 4:00 
GeneralRe: Never Pin
Chris Losinger11-Jun-21 7:24
professionalChris Losinger11-Jun-21 7:24 
GeneralRe: Never Pin
Daniel Pfeffer13-Jun-21 23:49
professionalDaniel Pfeffer13-Jun-21 23:49 
GeneralNope. Pin
OriginalGriff6-Jun-21 19:11
mveOriginalGriff6-Jun-21 19:11 
I'd have to look up what exactly a Balanced tree was before I started - it's just been too long since I needed to know that for exams, and I've not had to create even a BST once since I left Uni.

I still think it's important to learn them though - so at least you know they exist if you do ned them at some point in your career, and can then try to remember how to implement one.

I just checked what a BBST is, and now I remember. I did it a few times at Uni, and I could do it in about twenty minutes or so including testing. Maybe half an hour - setup of the node structure and sample data for testing is a little time consuming.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Nope. Pin
Nelek7-Jun-21 21:17
protectorNelek7-Jun-21 21:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.