Page 1 of 2 | Next »
[06:16:00] warrshrike: the result should be a complete traversal of the tree but only the root is printed
[06:23:30] warrshrike: the result should be a complete traversal of the tree but only the root is printed
[06:33:04] warrshrike: hey your code is same as mine instead youre using three attr reads instead of one attre accible
[06:34:06] warrshrike: havenwood: btw i see you're working at Square. Cool! I didn't know they used ruby
[06:35:56] warrshrike: havenwood: oh wow really! I've been applying for summer internships and ive havent had much luck with ruby companies though ive looked. Do you guys have an intern program?
[06:37:54] warrshrike: havenwood: ohh. Yeah so if i did left = nil as opposed to left: nil, it wouldnt work in that kwarg style?
[06:39:13] warrshrike: the first big shock for me was when i learned that ruby doesnt have first class functions and you need to use implicit blocks with yield
[06:42:25] warrshrike: havenwood: oh yeah i know that about procs. I was still surprised when I found out that you can't just assign a function to a variable or send it as an argument etc.
[07:11:18] warrshrike: Woot https://squareup.com/careers/jobs?type=Intern Maybe I'll see you guys in the summer ^_^
[07:15:04] warrshrike: baweaver: yeah im filling it out right now. I hope they at least interview me lol
[07:18:12] warrshrike: its quite annoying when you never hear back from a company you really want to work at. like, its still honorable when you fail an interview
[00:04:25] warrshrike: phaul: here you go class ListNode attr_accessor :val, :next def initialize(val, n) @val = val @next = n end end
[23:52:12] warrshrike: if i do keep a pointer to the head and start iterating and checking if if (node == head)
[11:09:36] warrshrike: tbuehlmann: why would either of those lines cause issues? I mean 23 is just a return statement
[11:14:32] warrshrike: canton7: we pass around the objects, their addresses or copies of the objects?
[11:16:41] warrshrike: tbuehlmann: so the value the object is storing is directly given to the asignee?
[11:24:29] warrshrike: so its really call by value, but in some special cases the method may mutate the og obj/data structure
[11:35:43] warrshrike: it removes the element we are supposed to remove by assign prevs next to the one ahead of target...
[11:36:46] warrshrike: the problem would be fairly trivial but im trying to do it in one pass...the trade off I chose is O(N) storage
[11:37:57] warrshrike: clearly the corner cases dont work because 0-1 is -1 and that returns nil from the array containing nodes...
[12:24:22] warrshrike: kke: in seriousness you're probably right stackoverflow has becomes great and the amount of ruby info is very large but nonetheless
[12:25:05] warrshrike: I'll always be thankful to this channel they helped me during some dark nights
[12:52:07] warrshrike: is there a queue like thing of fixed size which autoremoves the oldest element when a newer is pushed and size is full?
[11:54:03] warrshrike: can someone give me some efficient code to test whether string has only unique characters
[12:54:06] warrshrike: href: simply that given a string, two characters should not occur more than once
[12:56:14] warrshrike: so if i check the reduce accumulator everytime, wouldnt it be very inefficient
[18:50:05] warrshrike: most solutions i see are either swapping the values (as opposed to actual nodes) or just making a circle, taking new head, and breaking the circle.
[22:27:05] warrshrike: runner.rb:9:in `sub': no implicit conversion of Integer into String (TypeError)
[22:31:52] warrshrike: nvm I got it I have been writing kotlin code for way too long please excuse my ignorance