this post was submitted on 08 Nov 2024
13 points (100.0% liked)

askchapo

22757 readers
567 users here now

Ask Hexbear is the place to ask and answer ~~thought-provoking~~ questions.

Rules:

  1. Posts must ask a question.

  2. If the question asked is serious, answer seriously.

  3. Questions where you want to learn more about socialism are allowed, but questions in bad faith are not.

  4. Try !feedback@hexbear.net if you're having questions about regarding moderation, site policy, the site itself, development, volunteering or the mod team.

founded 4 years ago
MODERATORS
 

cross-posted from: https://hexbear.net/post/3855446

So I have an interview coming up sometime in the next 2 weeks and I have to do a few coding and SQL problems as part of it. I wanna start practicing now because I've gotten a bit rusty on algs and such. Does anyone have any suggestions on like array sorts and such to work on or like code golf sites to use? I have Leetcode pulled up and will be working a bit through that today but I just wanna get in as much practice as I can leading up to the interview. I donno when the interview will be but I just heard through the grapevine that there will be one.

I've been working on my own webdev stuff but the most I've had to touch JavaScript for is basically conditionals and loops, so I feel like I've fallen down on the other stuff a bit.

TIA

top 6 comments
sorted by: hot top controversial new old
[–] propter_hog@hexbear.net 3 points 4 days ago (1 children)

Copying my comment from that thread:

https://www.crackingthecodinginterview.com/

Not linking to amazon. I got my copy from a thrift store.

Also, to add to this, in my experience it helps to have a few algorithms memorized. I learned Red Black Trees, Bubble Sort, Merge Sort (and why it's always faster than Bubble Sort), and how to write a stack. There are undoubtedly other ones to memorize, too, but these came up a lot in my interviews. They usually will not say, "hey, write a bubble sort real quick", but if you can hammer it out when they ask you to find the smallest item in an array or whatever, they'll be pleased. And when they ask how you could speed it up, swap out bubble sort for merge sort. It's just good info to have in your tool box.

[–] roux@hexbear.net 4 points 4 days ago (1 children)

Algs are something I've been really meaning to get back up to speed on. Sometime next year I plan on really tackling ReactJS and all the more advanced JS stuff but this sort of fell into my lap. Thanks for the extra info too.

I for sure had Bubble sort in mind as well as just find smallest number in an array etc. Embarrassingly, Red Black Trees is unfamiliar and I've only heard of Merge so it looks like I should start there.

[–] propter_hog@hexbear.net 5 points 4 days ago (1 children)

I've only ever been asked to explain how a Red Black Tree works; I haven't had to implement it. It's important because it's the basis for how operating systems handle paging.

[–] roux@hexbear.net 4 points 4 days ago

It's honestly the first time I've heard about it. I'll look into it.

[–] comrade_pibb@hexbear.net 2 points 4 days ago (1 children)

For SQL it's probably worth brushing up on joins as well as the other algos mentioned in another comment

[–] roux@hexbear.net 3 points 4 days ago

A friend sent me a refresher that doesn't include joins so I was gonna include them as well.