Click here to Skip to main content
15,909,656 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Saturday programming challenge Pin
harold aptroot15-Nov-14 12:26
harold aptroot15-Nov-14 12:26 
GeneralRe: Saturday programming challenge Pin
PIEBALDconsult15-Nov-14 14:12
mvePIEBALDconsult15-Nov-14 14:12 
GeneralRe: Saturday programming challenge Pin
BillWoodruff15-Nov-14 16:56
professionalBillWoodruff15-Nov-14 16:56 
GeneralRe: Saturday programming challenge Pin
Jörgen Andersson15-Nov-14 19:31
professionalJörgen Andersson15-Nov-14 19:31 
GeneralRe: Saturday programming challenge Pin
PIEBALDconsult15-Nov-14 19:58
mvePIEBALDconsult15-Nov-14 19:58 
GeneralRe: Saturday programming challenge Pin
Jörgen Andersson16-Nov-14 9:02
professionalJörgen Andersson16-Nov-14 9:02 
GeneralRe: Saturday programming challenge Pin
PIEBALDconsult16-Nov-14 10:21
mvePIEBALDconsult16-Nov-14 10:21 
GeneralRe: Saturday programming challenge Pin
Jörgen Andersson16-Nov-14 11:33
professionalJörgen Andersson16-Nov-14 11:33 
PIEBALDconsult wrote:
Is a node its own ancestor?

Yeah, it'll have to be. As you've noticed yourself it becomes wrong otherwise.
The purpose is to find the Lowest Common Node that all nodes in the list inherits from. So if I only give one node that's the one I want.
Or if I give you two nodes where one inherits from the other I want the higher up node.
Another case where it becomes wrong is if I put a top node in the parameter collection, it doesn't have a parent.
PIEBALDconsult wrote:
Perhaps you're building the map only as you need it (and keeping it I hope).
I'm building the whole map all at once, but perhaps I should be lazier, in case of very large tables.

Yes, but only for the sake of the challenge. In a real world scenario I can't think of a situation where I wouldn't preload the map.
Well, that's of course because my job only handles human hierarchies with less than a million nodes. If I were to work in chemistry or biology the situation could be different.
Wrong is evil and must be defeated. - Jeff Ello
Any organization is like a tree full of monkeys. The monkeys on top look down and see a tree full of smiling faces. The monkeys on the bottom look up and see nothing but assholes.

GeneralRe: Saturday programming challenge Pin
PIEBALDconsult16-Nov-14 11:55
mvePIEBALDconsult16-Nov-14 11:55 
GeneralRe: Saturday programming challenge Pin
PIEBALDconsult16-Nov-14 16:37
mvePIEBALDconsult16-Nov-14 16:37 
GeneralRe: Saturday programming challenge Pin
Jörgen Andersson16-Nov-14 20:29
professionalJörgen Andersson16-Nov-14 20:29 
GeneralRe: Saturday programming challenge Pin
PIEBALDconsult17-Nov-14 4:05
mvePIEBALDconsult17-Nov-14 4:05 
GeneralRe: Saturday programming challenge Pin
PIEBALDconsult17-Nov-14 13:28
mvePIEBALDconsult17-Nov-14 13:28 
GeneralRe: Saturday programming challenge Pin
PIEBALDconsult16-Nov-14 13:57
mvePIEBALDconsult16-Nov-14 13:57 
GeneralRe: Saturday programming challenge Pin
Jörgen Andersson16-Nov-14 20:20
professionalJörgen Andersson16-Nov-14 20:20 
GeneralRe: Saturday programming challenge Pin
Michael Sisco17-Nov-14 7:14
Michael Sisco17-Nov-14 7:14 
GeneralRe: Saturday programming challenge Pin
Jörgen Andersson17-Nov-14 8:59
professionalJörgen Andersson17-Nov-14 8:59 
JokeNew Tattoo PinPopular
Mike Hankey15-Nov-14 10:25
mveMike Hankey15-Nov-14 10:25 
GeneralRe: New Tattoo Pin
Oso Oluwafemi Ebenezer17-Nov-14 3:55
Oso Oluwafemi Ebenezer17-Nov-14 3:55 
GeneralRe: New Tattoo Pin
PhilLenoir17-Nov-14 4:33
professionalPhilLenoir17-Nov-14 4:33 
GeneralRe: New Tattoo Pin
Oso Oluwafemi Ebenezer17-Nov-14 5:09
Oso Oluwafemi Ebenezer17-Nov-14 5:09 
GeneralRe: New Tattoo Pin
Gary R. Wheeler21-Nov-14 12:56
Gary R. Wheeler21-Nov-14 12:56 
Generalfrom flippin' at the Golden Arches to Twitch super-star and Red-Bull-Boy Pin
BillWoodruff15-Nov-14 7:27
professionalBillWoodruff15-Nov-14 7:27 
GeneralRe: from flippin' at the Golden Arches to Twitch super-star and Red-Bull-Boy Pin
PIEBALDconsult15-Nov-14 8:09
mvePIEBALDconsult15-Nov-14 8:09 
GeneralRe: from flippin' at the Golden Arches to Twitch super-star and Red-Bull-Boy Pin
newton.saber15-Nov-14 9:32
newton.saber15-Nov-14 9:32 

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.