Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,849 members, 7,956,186 topics. Date: Monday, 23 September 2024 at 07:16 AM |
Nairaland Forum / Science/Technology / Programming / Programming Interview Question: Invert A Binary Tree (1622 Views)
I Need A Programmer To Code A Binary.com Bot For Me / Need A Php Web Developer In Porthacourt For A Binary Mlm Script / I Need A Binary MLM Script (2) (3) (4)
Programming Interview Question: Invert A Binary Tree by project7(m): 7:40am On Oct 19, 2016 |
Reflecting on a tweet by Max Howell: Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so fvck off. So in your language of choice how do you invert a Binary Tree. For example: This 1 / \ 2 3 / \ \ 4 5 6 To this 4 5 6 \ / / 2 3 \ / 1 |
Re: Programming Interview Question: Invert A Binary Tree by paranorman(m): 8:38am On Oct 19, 2016 |
project7:I don't even understand. |
Re: Programming Interview Question: Invert A Binary Tree by SeunLanLege(m): 9:27am On Oct 19, 2016 |
project7: [size=19pt]Javascript [/size] var tree = function(root) { if (!root) return null; tree(root.left); tree(root.right); x = root.left; root.left = root.right; root.right = x; return root; }; Simple and easy 1 Like |
Re: Programming Interview Question: Invert A Binary Tree by asalimpo(m): 10:05am On Oct 19, 2016 |
crap. Does he invert binary trees in his "day job"? Did he invert binary tree when creating home brew? These interviewers just pull questions out of their ass and fling them at interviewees. 1 Like |
Re: Programming Interview Question: Invert A Binary Tree by sharrp: 2:05pm On Oct 19, 2016 |
asalimpo:You get the whole point of that wrong. Yes the interview process is flawed. But a company like google is always about scaling and efficiency. Knowing when to use an array or a binary search tree really has a lot of payoff for a company like google. 70% of google engineers maintain and refactor code bases but their is 30% that takes on a new project aimed at millions of users. Knowing the right data structures to use helps a lot. And that dude was not rejected because he coundt invert a binary tree. Failing one question doesn't spell doom for a google interview |
Re: Programming Interview Question: Invert A Binary Tree by sharrp: 2:06pm On Oct 19, 2016 |
SeunLanLege:When you copy a code online ,understand it. This does not invert a binary tree. 1 Like |
Re: Programming Interview Question: Invert A Binary Tree by SeunLanLege(m): 2:35pm On Oct 19, 2016 |
sharrp: Really? Then enlighten us, oh great one. Oh and point links to where I copied the code. . When making accusations provide proof or you'll make yourself look immature. |
Re: Programming Interview Question: Invert A Binary Tree by silento(m): 3:35pm On Oct 19, 2016 |
google did that to mock the guy they even said Bleep u nvidia |
Re: Programming Interview Question: Invert A Binary Tree by ultmatmus(m): 8:34pm On Oct 19, 2016 |
SeunLanLege:I know you... i saw you at that microsoft aiki program at funaab today 1 Like |
(1) (Reply)
Lisfollow (a Thirdparty Follower Stat Tool For Linda Ikeji Social) / USD Visa Virtual Card | Fund With Bitcoin | Pay Anywhere Online / My Lenovo A390t Cannot Install Apps. Help!!
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13 |