|
Well, the interviewer specifically told me before she sent the question to not "overthink it or implement any custom or complex data structures", which I figured meant I shouldn't dare mention a heap. I was hesitant to mention the linked list for the same reason, but the line was in there when time was almost up. I spent about 3 minutes writing the email and about 25 adding and subtracting stuff about heaps and linked lists. Edit: Though I guess you can implement a heap Insert and DeleteMin on an array just as easily as a list insertion so it technically doesn't count as a custom data structure. gently caress. I was more worried about their definition of "data structure" than I was about the question. I was paranoid that even mentioning anything other than a linearly ordered collection of data would disqualify me. Linear Zoetrope fucked around with this message at 10:39 on Sep 25, 2013 |
# ? Sep 25, 2013 10:34 |
|
|
# ? Jun 1, 2024 21:27 |
|
Sorry, I totally missed the text after your solution. I'm also terrible at C++, never mind C, but I do think the point stands about not writing most of the actual implementation yourself. I don't remember the exact algorithm for an in-place insertion sort but surely it's still going to iterate over the entire list looking for out-of-order elements? I considered a heap too but then you need to be able to make sure it doesn't go above 100 items, which means either iterating over the entire tree every time you add an item, or keeping the size as a separate variable. Although a linked list actually has the same issue. Unless I'm missing a neat trick here? If I was given that question I'd most likely find the right place with a binary search. Oh and I'm three weeks into my first pure dev role (used to do a mixture of support/testing/dev) so my advice may be terrible.
|
# ? Sep 25, 2013 10:44 |
|
If you keep a heap size variable (which you probably should anyway, to prevent bad errors), you can just remember to call DeleteMin on it when heapSize > 100. Which adds an extra comparison and a second call, but the deletion call is also only log n, which keeps the whole algorithm O(log n). Honestly, given the wording of the question, you don't even need to delete anything, you could just log everything and only show the user the first 100.FamDav posted:also you sound insufferable. I am. I did ruin my first two interviews I ever got at different places by telling them I was terrible and they shouldn't hire me because I'm bad, stupid, and obnoxious. Then hanging up. Not sarcasm, or joking. I had to try really hard to not say it on this one. Linear Zoetrope fucked around with this message at 10:52 on Sep 25, 2013 |
# ? Sep 25, 2013 10:47 |
|
Jsor posted:I was more worried about their definition of "data structure" than I was about the question. I was paranoid that even mentioning anything other than a linearly ordered collection of data would disqualify me. They're not looking for reasons to disqualify you, but for reasons to accept you. They're putting you under pressure to see how you respond. It's okay if you make a mistake, and you shouldn't hold back from showing them what you're capable of out of fear, especially because recovering from a mistake is valuable information and something you'll be doing all the time at work. By all means try to find the right answer, but only because trying to give the right answer reveals how you think. If you're not sure what they want, ask, because the questions you ask are very revealing. Remember above all else - and this will take some getting used to if you're fresh out of school - an interview is not an exam. You'll get used to this in time, and it'll be faster if you can remember to keep calm. You'll start to get an idea of what employers are actually looking for, and how well you can give it to them.
|
# ? Sep 25, 2013 10:53 |
|
Jsor posted:If you keep a heap size variable (which you probably should anyway, to prevent bad errors), you can just remember to call DeleteMin on it when heapSize > 100. Which adds an extra comparison and a second call, but the deletion call is also only log n, which keeps the whole algorithm O(log n). Honestly, given the wording of the question, you don't even need to delete anything, you could just log everything and only show the user the first 100. I don't know what these people specifically wanted, but I think the main point was being able to deal with an infinite stream and you got that fine. A heap would be better, but in either case if it were me I'd really want to see the implementation of either the insertionSort method or the heap itself. Showing you can really actually code is never a bad thing.
|
# ? Sep 25, 2013 11:43 |
|
Jsor posted:Oh, and I did get one interview at a digital signal processing place a few weeks ago and got this interview question, I found it rather easy, but maybe it's secretly not. I'm pretty confident but does anyone see anything wrong with it? It's possible the answer is fine and I haven't heard back because they went with a PhD or something. The biggest problem I found with your solution is that many of your assumptions were bad for the context that your putative employer works in (eg. your reasoning about performance was all in terms of asymptotic time complexity, which isn't the most important thing for a realtime DSP system like the one described in the problem, you assume that shifting an array is expensive whereas DSP chips can often do this very very cheaply as it is part of their raison d'etre, etc). For a bad interviewer this is a death sentence, as it indicates you lack domain experience and they'll just eyeroll and tell their boss they don't want to train this clown. For a good interviewer, this is less of a problem if you ask questions to clarify whether your assumptions are good or not, which you don't seem to have done. There are obviously problems with your actual implementation as well, but the issues with your assumptions eclipse them. I would say the next time you interview for a place, study their problem domain well before you interview and get at least the fundamentals down (for example, how well prepared were you in the DSP interview to answer questions about the discrete fourier transform, and if he'd drawn a quick plot of a function's z-domain poles and zeroes and asked you whether it was stable would you have been able to answer?).
|
# ? Sep 25, 2013 13:19 |
|
The job posting specifically said they were looking for people with no prior experience in the field. But you guys are right, I'm really too much of a blithering idiot for CS. A friend of a friend who works there apparently said the interviewer did recommend me for another interview (my friend wanted them to ask for me for some reason), but I haven't heard for weeks. Still I just sent a followup email saying that I'm too stupid to work there. I'm going to go try and get a job at a department store, maybe they're hiring for Christmas now. Sorry for wasting everyone's time. Linear Zoetrope fucked around with this message at 13:36 on Sep 25, 2013 |
# ? Sep 25, 2013 13:33 |
|
Jsor posted:I am. I did ruin my first two interviews I ever got at different places by telling them I was terrible and they shouldn't hire me because I'm bad, stupid, and obnoxious. Then hanging up. Jsor posted:Still I just sent a followup email saying that I'm too stupid to work there. I'm going to go try and get a job at a department store, maybe they're hiring for Christmas now. Sorry for wasting everyone's time. This is why you don't have a job. If you don't know how to answer an interview question it's fine. Just talk through it. 99% of the time the interviewer will help you get on the right track for solving a problem as long as you are explaining your thought process. Also maybe you should just see a therapist or something because you seem to hate yourself a lot?
|
# ? Sep 25, 2013 13:41 |
|
Jsor posted:Still I just sent a followup email saying that I'm too stupid to work there. I'm going to go try and get a job at a department store, maybe they're hiring for Christmas now. Sorry for wasting everyone's time. what the gently caress
|
# ? Sep 25, 2013 14:12 |
|
Jsor posted:The job posting specifically said they were looking for people with no prior experience in the field. Everybody starts out as too much of a blithering idiot for CS, but you're setting new records.
|
# ? Sep 25, 2013 14:15 |
|
It has nothing to do with not being able to answer questions. I give up especially quickly if the interview goes well. I know the saying: somebody is always better than you. But that doesn't mean in all aspects. What if I interviewed well, but the person who is actually more qualified interviews poorly? I can't bear the thought that the better person didn't get the job, so at the very end I panic and tell them that I've made a horrible mistake and to go with someone else. This time I was okay, but I just realized that there it's almost certain than any other candidate would be a better fit. It's okay, I'm used to it. In college I was okay, but in high school I literally discreetly tore up my homework and threw it away in class because I knew I didn't deserve to get a good grade, regardless of what the answers actually were. But I don't think I should post again since this should be about CS jobs and not my issues. Thank you guys for making me realize that I could have made a terrible mistake and potentially hurt a person and/or company though. I mean that sincerely. e: And my last therapist said that my social and general anxiety was too bad for me to be a normal person. So, no, therapy probably won't help whoever mentioned it because it seems according to him I was beyond repair. Linear Zoetrope fucked around with this message at 14:29 on Sep 25, 2013 |
# ? Sep 25, 2013 14:22 |
|
Otto Skorzeny posted:The biggest problem I found with your solution is that many of your assumptions were bad for the context that your putative employer works in (eg. your reasoning about performance was all in terms of asymptotic time complexity, which isn't the most important thing for a realtime DSP system like the one described in the problem, you assume that shifting an array is expensive whereas DSP chips can often do this very very cheaply as it is part of their raison d'etre, etc). Come on, he only mentioned the O() behavior of insertion sort to illustrate it was guaranteed bounded linear time for this situation instead of potentially O(n^2), and that's very relevant to a realtime/DSP as well. Also, hardware-assisted "shifting" through circular buffers isn't going to help him because he needs to insert in the middle of the array. At least mentioning a heap would've been better, as would actually having shown the implementation of insertion sort, but solely being disqualified on that answer when there was no-one to bounce your thinking off on would be harsh. I doubt that's what happened. Given the stated nature of the problem it's a fair solution. The problem was likely lack of self-confidence as is obvious by now :-/
|
# ? Sep 25, 2013 14:32 |
|
Jsor posted:e: And my last therapist said that my social and general anxiety was too bad for me to be a normal person. So, no, therapy probably won't help whoever mentioned it because it seems according to him I was beyond repair. If the therapist said it exactly in those words he was an unhelpful idiot. If they didn't, then the idea that you will never get over it is your own interpretation. And it sounds to me like the distorted all or nothing thought patterns that are typical of people with anxiety issues. Whether the therapist was an idiot or you made up your own bullshit interpretation based on something he said, the solution is the same, find a new therapist. You can in fact beat this, it takes help to identify the thought patterns and tell yourself that you are not thinking straight.
|
# ? Sep 25, 2013 14:46 |
|
Yeah I was a prick there. Mea culpa. I apologize for being a jerk to you dude, obviously internet strangers are a poor source of life advice but you aren't an idiot or incompetent (especially compared to many working programmers!) and I recommend you find a therapist that isn't an idiot pissfucker.
|
# ? Sep 25, 2013 14:48 |
|
Medication might be a short term solution. I have some anxiety issues and I took a benzo before my last interview. While I was a little bit high during it and just wanted to leave to go to the Dunkin Donuts across the street, I nailed the whiteboard part which usually makes me anxious. Too bad they didn't want to pay me enough and it fell through in negotiations.
|
# ? Sep 25, 2013 14:57 |
|
Jsor posted:But you guys are right, I'm really too much of a blithering idiot for CS. A friend of a friend who works there apparently said the interviewer did recommend me for another interview (my friend wanted them to ask for me for some reason), but I haven't heard for weeks. Still I just sent a followup email saying that I'm too stupid to work there. Let me tell you something: 90% of the other applicants that applied wouldn't be able to answer that question. In no way are they laughing at you and thinking you're stupid. They're already too busy laughing at the people who answer the question with "what's a 'stream of numbers'". Jsor, you aren't dumb, and please stop beating up on yourself. It's not a nice thing to do and it makes me worried.
|
# ? Sep 25, 2013 14:58 |
|
Suspicious Dish posted:Let me tell you something: 90% of the other applicants that applied wouldn't be able to answer that question. I had to interview CS graduates for a support/dev role and it was insufferable, about 80% of the applicants could not code for poo poo. Like, code not even write insertion sort and similar things. Don't ever tell yourself that you are stupid because there are a lot of awful programmers around who cannot do the basic things that you clearly can do.
|
# ? Sep 25, 2013 16:33 |
|
Whether you think you can or you can't, you're right.
|
# ? Sep 25, 2013 16:37 |
|
Well this is something to wake up to. Jsor, San Diego is not halfway across the country and it has more tech job opportunity than where you are now. Many corporate-managed apartments will allow you to buy out of a lease early under terms agreed in advance. Nobody else is getting trained in agile processes and design patterns in a CS school. You know why I post itt so much? Because I was unemployed for a year and a half. I have big name experience and big name education but all the credentials in the world count for zip if you don't pitch yourself to employers as someone who can do the job.
|
# ? Sep 25, 2013 16:46 |
|
Jsor: http://www.amazon.com/Cracking-Coding-Interview-Fourth-Edition/dp/145157827X Dude I failed the ONLY programming question I was asked in my interview (SQL question). The only thing is I listed my skills critically. On my resume I had that I was novice level in SQL, so it would have just been bonus points if I did do it correctly ("SELECT DISTINCT City FROM Customers" was the answer). Now I've been here for 4 months and I'm making enough money to support my wife who may be quitting her job, and to an extent my sister and our step nieces (who my sister has guardianship over) who live with us. We live in a 2,000 sq/ft town home and we just bought my wife her own car (used of course) after sharing for the first 4 years of our marriage. The only difference between you and me? I didn't loving email the companies I was interviewing for telling them I'm going to go work for a department store instead. AND I don't have a degree, either. If I were the one interviewing you, I would think you're either manipulating the gently caress out of me trying to make pity you into giving you a job which may be what you're trying to do, or that you have some serious self confidence problems. I could deal slightly with #2 as an employer, but nothing to the extent you've demonstrated. If it's the latter, have you thought about taking boxing/mma classes? You'll gain Serotonin thereby happy feelings from the exercise, and also confidence in knowing you can better protect yourself and your family. It sounds like it would be great for you. As someone who also suffers from anxiety in public situations it really did wonders for me. You could take this post as being somewhat harsh towards you, or you can see I'm trying to help and look at yourself and your recent actions critically to try to figure out how you could make the same situation work out better in your favor next time. It truly is your choice.
|
# ? Sep 25, 2013 17:21 |
|
Jsor posted:It has nothing to do with not being able to answer questions. I give up especially quickly if the interview goes well. I know the saying: somebody is always better than you. But that doesn't mean in all aspects. What if I interviewed well, but the person who is actually more qualified interviews poorly? I can't bear the thought that the better person didn't get the job, so at the very end I panic and tell them that I've made a horrible mistake and to go with someone else. This time I was okay, but I just realized that there it's almost certain than any other candidate would be a better fit. First: Interviews suck. Interviewers suck. This whole process sucks. They haven't called back because people at companies work and sometimes forget about candidates. It sucks but it's true. Your job at the moment is to email them and find out where you are in the process. Your thinking should be, "Sup dudes, why have you not hired me yet?" But you've got what seems to be serious imposter syndrome and other issues that you should probably figure out. Glancing through most of your posts you sound like what I think Woody Allen's character in his movies would sound like if they he was a CS major. Literally there shouldn't be this much anxiety coming from you. Obviously you will be nervous, but "take a chill pill" has never been more apt. Seriously don't be such a trainwreck about all this.
|
# ? Sep 25, 2013 17:52 |
|
I highly recommend figuring out anxiety issues and the like before really tackling the . I've got anxiety issues as well, and I'm taking a rest to work on them while I'm studying on the side. It's very much worth it to do so, you won't start freaking out over what they'll think of you, you won't worry over omg what if they reject me END OF THE WORLD etc. Do look into therapy. I think you would benefit immensely from it.
|
# ? Sep 25, 2013 18:24 |
|
I don't think Jsor is coming back to this thread. I hope he gets help. He's probably a lot smarter than, oh, 90% of the people I work with, including myself.
|
# ? Sep 25, 2013 20:50 |
|
Serious Hardware / Software Crap > The Cavern of COBOL > Newbie Programming Interviews/Get a Job Megathread: More E/N than E/N
|
# ? Sep 25, 2013 21:19 |
|
Jsor posted:I can't bear the thought that the better person didn't get the job Incredibly helpful advice: don't think this. Not only is it not your duty right now to ensure that other people get a job, if you don't stop doing this you won't get a job and it'll never become your duty to ensure "the better person" gets the job. You're throwing yourself in front of a bus in the hopes that it will allow Mr. Awesome to use the crosswalk.
|
# ? Sep 25, 2013 21:25 |
|
e: nm i guess
JawnV6 fucked around with this message at 22:33 on Sep 25, 2013 |
# ? Sep 25, 2013 21:56 |
|
JawnV6 posted:I hope everyone posting here can empathize with Jsor Not really; his issues go much farther than impostor syndrome, even if his case is the most extreme I've ever heard of. This is a guy who applied to 10-15 jobs in a year, and is only now seeking help. Jsor: You're a competent enough guy to get an entry-level position somewhere, even with the locality requirement. A bunch of forum posters telling you that isn't going to fix your issues though - you really need a good therapist. Shop around, you don't have to settle for the first dude you find.
|
# ? Sep 25, 2013 22:08 |
|
Jsor posted:Maybe it's also my constraints, I really need to stay in Tucson or Southern Arizona-ish, mostly because I plan on going to grad school next fall and especially with typical apartment lease lengths it's really senseless and financially difficult to move halfway across the country only to move halfway across again to attend school in a year, but I really need something until then. You've decided where you're going to grad school? And you know you're accepted there? I don't get how it's financially difficult for a young person to move across the country. You (a) put your stuff in a car, (b) drive there. Problem solved. You got furniture already? Burn it. Edit: Are you sure there isn't somebody more qualified to take your spot in grad school?
|
# ? Sep 25, 2013 22:52 |
|
Jsor needs some therapy to deal with depression and anxiety or w/e and should go to a non shitlord therapist Source: imposter syndrome is pretty common and treatable
|
# ? Sep 26, 2013 00:23 |
|
Malcolm XML posted:Jsor needs some therapy to deal with depression and anxiety or w/e and should go to a non shitlord therapist I hope the Yahoo Answers practice of labeling random details as "Source" won't become more common here.
|
# ? Sep 26, 2013 02:08 |
|
If Jsor is still reading the thread then I highly recommend this book. And yeah get a non-lovely therapist who's read a loving book in the past 30 years. So last night I met up with some fellow computer nerds and I cried about my bad coding interview. They suggested asking for a redo. I thought that seemed like an utterly insane idea but I tried it anyway, telling the hiring guy that I hadn't done much interviewing, had wrong expectations for success and psyched myself out. I felt like a crazy person but I sent that drat email anyway. I heard back this morning and I didn't even want to open it but I did and . . . Not only was he thrilled that I asked to try again but he really wanted my input as to how to help reduce nerves among candidates. So yeah, asking for a redo is A Thing You Can Do apparently.
|
# ? Sep 26, 2013 07:36 |
|
Redo's are not one I've come across before, but back when I was an interviewer I would happily have given a second chance to someone - it shows that they are serious about the job & want to try again. (Unless they were totally rubbish with no hope). At the end of the day I would only be there if we needed more meat for the grinder, and as long as you can actually code a bit and weren't an rear end in a top hat then we could usually find somewhere to put you while you got to grips with 'real' coding. (You would be surprised how many people fail the second of those requirements) Make no mistake - when we interview new graduates, we know they will be pretty clueless about a lot of the specific methods & standards we use, and part of the interview is just working out how much that is. Anyone who comes in 'knowing it all' will get a lot of suspicion that they are bullshitting tbh, so better to say when you haven't come across something.
|
# ? Sep 26, 2013 12:05 |
|
I want to believe that interviewers are like you guys and genuinely want to engage and work with people and accept faults and limitations. Unfortunately, I've got it in my head that interviewers are more like desk clerks at the DMV.
|
# ? Sep 26, 2013 13:29 |
|
Pollyanna posted:I want to believe that interviewers are like you guys and genuinely want to engage and work with people and accept faults and limitations. Unfortunately, I've got it in my head that interviewers are more like desk clerks at the DMV. They're what the desk clerk would be if he knew you're the one who's going to be driving his bus to work for the next 2 years.
|
# ? Sep 26, 2013 13:37 |
|
Skuto posted:They're what the desk clerk would be if he knew you're the one who's going to be driving his bus to work for the next 2 years. Wouldn't you be very picky in that situation?
|
# ? Sep 26, 2013 13:47 |
|
Pollyanna posted:I want to believe that interviewers are like you guys and genuinely want to engage and work with people and accept faults and limitations. Unfortunately, I've got it in my head that interviewers are more like desk clerks at the DMV. As one who has given interviews and has dealt with others who have, you'll get a mixed bag. The Redo thing is actually something I've never been asked and personally would be okay with if it felt like you really did have a performance anxiety thing going and could potentially do better enough to justify taking the time to go through the process again. But not everybody would be willing to do that, some interviewers are definitely One And Done. Keep in mind, in some markets it can be hard to find good developers, and you may have more leverage than you think if you truly do have the chops.
|
# ? Sep 26, 2013 13:53 |
|
Pollyanna posted:Wouldn't you be very picky in that situation? Oh yes. Nobody is going to hire you if they have doubts you can do the job. But they're also not going to get hung up over a minor mistake if the person who passed with 100% looks like a raging lunatic, smells of corpses and has a swastika tattooed on their forehead. (And I don't know much about driving licenses in the US but I'm pretty sure you're allowed to retake them, too) Hiowf fucked around with this message at 14:01 on Sep 26, 2013 |
# ? Sep 26, 2013 13:59 |
|
I imagine it's a bit different at the junior/entry level, though, since you're unlikely to have a dearth of possible applicants. It makes sense that a senior developer with like 10 years in Java or something would command a good amount of leverage because that company really really really wants a good Java developer, but I don't see what a junior could bring to a table to get that same amount of leverage.
|
# ? Sep 26, 2013 13:59 |
|
Pollyanna posted:I imagine it's a bit different at the junior/entry level, though, since you're unlikely to have a dearth of possible applicants. It makes sense that a senior developer with like 10 years in Java or something would command a good amount of leverage because that company really really really wants a good Java developer, but I don't see what a junior could bring to a table to get that same amount of leverage. You hire people because you want to do more things that bring you PROFIT. You get paid because you HELP US MAKE MONEY. An excellent junior costs little compared to a senior and may not be too far off in productivity. This means EVEN MORE MONEY. No leverage, you say?
|
# ? Sep 26, 2013 14:06 |
|
|
# ? Jun 1, 2024 21:27 |
|
Skuto posted:You hire people because you want to do more things that bring you PROFIT. ...Huh. I never thought of it that way. So the best thing I can bring to the table is the promise of growth?
|
# ? Sep 26, 2013 14:11 |