Started by Ryex, October 10, 2012, 04:49:55 pm
Quote from: winkioI do not speak to bricks, either as individuals or in wall form.
Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.
Quote from: Blizzard on October 11, 2012, 03:48:01 amJust make sure that you really don't want the aerospace degree for its own sake, not because you're not good at it. If you're not good at it, but you actually really want/like it, you can learn it, even if it takes some time.
Quote"Write a function that prints out every possible valid combination of parenthesis For example, if I gave you the input "3" You would print()()(), (())(), ((())), etc.This is probably the most challenging recursion problem you will end up gettingDon't worry if you don't get it off the top of your headThink carefully about itGet back to me in 5 minutes if you think you've got the answer"
$options=def build(depth = 3, s="", o=0, c=0) if c < depth if s == "" s += "(" o += 1 end if o < depth build(depth, s + "(", o + 1, c) build(depth, s + ")", o, c + 1) if o > c else while c < depth s += ")" c += 1 end $options.push(s) end endendbegin build(3) p $optionsend#ruby as I find it the fastest to prototype in
Quote from: Mr. Cloud on October 16, 2012, 02:25:33 amhe's only a few months older than me and making (according to him) 86 k a year working remotly for a company in NYC form San Francisco as a software developer.