This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Interviews and ??

 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Got laid off last week. So began trying a new job.
I went for a J2EE developer interview yesterday. The interview was with 3 people and flooded with J2EE questions which went very well. After 1.5 hours one person came up and asked me to write a Java class which implements a binary tree.. I got confused there.. because I hardly rember these data structures..
Any suggestions for me ? Have any body else experienced this type of suts ?
Please help
Thanks
 
Author
Posts: 6049
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Send an email and say, "I was a little rusty on my data structures, since I haven't had to use them in a while, but this weekend I reread the book on them. Here's my answer." But don't just give the basic answer, give an extended, detailed answer, with alternatives and analysis.
I had a guy do this, he sent a 3 page email, and we hired him.
--Mark
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent suggestion Mark! Also I would strongly recommend that you spend a few days brushing up on your data structures. It's been my experience, that 9 out of 10 times, you will be asked to write code on datastructures in an interview. This is the case even for positions requiring several years of experience. So it's advisable to refresh your memory. The good part though is that the questions are usually not very complicated, and involve simple structures like Lists, BinaryTrees, Hashtables (nothing fancy).
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Things could get real fancy too, such as in my interviews to get my current job. Fortunately, I'm real good on those, the fancier, the better
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, I like Mark's suggestion too. Emails after interview with excellent contents are always a good idea.
When my daughter just got into junior, her would-be-boss let her send some code snippet, she found some code written in Pascal in high school, c in class before entering the univ. assemply in college, VC++ 3 months ago. She wanted to modify those little, I told her, do not touch them, keep them as is with the original timestamps, sent them immediately. She was interviewed for a parttime receptionist and maintaining the website. She was offered a junior software engineer.
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Writing code implementing a binary tree is not hard if you have a few hours to do it, but it is not easy to come up with in a few minutes at a job interview. Some people like to ask difficult questions. I wouldn't worry about it too much.
 
Shreya Menon
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much for the responses.
I got an email from the company saying that they dont want to take me. Still I think I will be sending an email with the DS enabled.
And thanks for the suggestions. I shall brush my memory and learn writing binarytrees, lists and everything before attending another one.
But writing this type of programs is not possible sooner...
Thanks so much
Maya
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A binary tree on its own would be pretty easy to write in a few minutes (for me at least). What would be more difficult is if it was a self-balancing tree, so the insert and remove functions would be more complex. Things like that I'd have to refer to the big o' white Algorithms book (it was a bible during my undergrad)
YMMV of course
lance
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark and Lance,
I studied Data Structures in my graduation. I can't recall the book names but I think the two books that I read were by Horowitz and Aho & Ulman. I liked them very much. They were all implemented in Pascal. Much of my experience till now had been in C and Object Perl. Can you people suggest me a good book that covered DS implementation in Java and/or C#?
The other issue on this topic is that, a lot of times, you may be asked questions on core CS subjects like DS in the interviews. But it is so frustrating that many a times you wont be recognized for the quality of coding that you do at your work. I might work very hard to write a program and make sure it used appropriate data structures, tune for space and time, make it more robust, easily maintainable, etc. How many times you will be appriciated for the extra time and effort that you spend in doing so? Most of the cases, at least in the places that I worked, peole usually wanted immediate results. Code walkthrus, even if they are there, wouldn't usually disect into such issues. Since the benefits are not always immidiately visible, the other guy who gets the results faster who may or may not have a good code will get the pat on the back.
May be I am being cynical here. I always enjoy good programming, but I had some bad experiences and it was just my experience.
Murali.
 
Mark Herschberg
Author
Posts: 6049
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Murali Koppula:
Can you people suggest me a good book that covered DS implementation in Java and/or C#?


I don't know any Java or C# Algorithms books. I like Introduction to Algorithms, Second Edition. Everything is in psuedocode.

Originally posted by Murali Koppula:

The other issue on this topic is that, a lot of times, you may be asked questions on core CS subjects like DS in the interviews. But it is so frustrating that many a times you wont be recognized for the quality of coding that you do at your work. I might work very hard to write a program and make sure it used appropriate data structures, tune for space and time, make it more robust, easily maintainable, etc. How many times you will be appriciated for the extra time and effort that you spend in doing so?


Sounds like you're working for bad places. Most places do appreciate it. Of course, don't misunderstand me, everytime I've done a sort I've used either quicksort or even bubblesort. There just wasn't any point to bothing with something more sophisticated.
This should come up interview. In addition to lower level algorithms questions, a good interviewer should ask high level system questions. Heck, whenever I ask an algorithm question, I also ask, "when and why do you use it? what are the alternatives?" Also, its common to be asked for a code sample during the interview process.
--Mark
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Mark Herschberg:

I don't know any Java or C# Algorithms books. I like Introduction to Algorithms, Second Edition. Everything is in psuedocode.


Excellent book, referred as Algorithms bible by many! I got the first edition when it came out, and still use it.
I did find an error in the first edition, hope them have fixed it.
[ June 05, 2002: Message edited by: Roseanne Zhang ]
 
Lance Titchkosky
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Mark Herschberg:

I don't know any Java or C# Algorithms books. I like Introduction to Algorithms, Second Edition. Everything is in psuedocode.
--Mark


That is indeed the 'bible' i refered too above. Its the best book imo for algorithms. I've seen both the first and 2nd edition and there are not many changes to them, you can most likely find a used copy of the first edition at any university used book store.
lance
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic