Live data from Hacker News

Algorithms

khanacademy.org

41–50 of 163 posts

Re: Algorithms

#41

It's strange they didn't cover dynamic programming at all. IMO every course should include at least one classical example of dynamic programming. For example: https://en.wikipedia.org/wiki/Longest_increasing_subsequence https://en.wikipedia.org/wiki/Longest_common_subsequence_pro...

Not being able to implement a DP solution to a problem has killed me in the last two Google interviews I've done. It's important to learn.

Re: Algorithms

#42

why python???? ... any language with functions will do. I mean just create a java class with all public static functions if you want it to work like python (global functions). Its really language agnostic. Your answer will be a number a string or a list of things. All languages can do that. Im making an explicit opinion that python is no better than any other language for implementing algorithms. HN please prove me w…

Significant whitespace is great for technical interviews - you don't need to worry about matching brackets and whatnot. No brackets also means you have some more vertical space to work with on the whiteboard.

Beyond that, if your interviewer is fluent in python, list comprehensions can greatly shorten the amount of boilerplate you have to write.

Re: Algorithms

#43

why python???? ... any language with functions will do. I mean just create a java class with all public static functions if you want it to work like python (global functions). Its really language agnostic. Your answer will be a number a string or a list of things. All languages can do that. Im making an explicit opinion that python is no better than any other language for implementing algorithms. HN please prove me w…

I'm not making a claim about Python being "best" for algorithms.

The course uses JavaScript. I recommend re-implementing the algorithms covered in the course in another language that you know well. It helped me really understand what's going on.

In my case, I'm most familiar with Python.

Re: Algorithms

#44

This is an excellent course and helped me get my current job. My background is chemistry/chemical engineering. I had applied for a data scientist position. Phone interview included a problem where I was asked about my solution's complexity. I admitted I didn't know about it. Still got called back for an interview on site, but the weekend before I powered through this course. Unsurprisingly, it came up in the on-site…

And now in your current job how often are you evaluating the complexity and implementing specialized algorithms?

Re: Algorithms

#45

Earlier quoted context omitted.

> they become very important as you progress into writing more advanced programs As someone with a Computer Science degree I can say that the only times I have ever used any of the algorithms I learned directly was when writing low level C and GoLang. I'm willing to bet 90% of programmers... even those that right "advanced" programs do not use them day to day. Every algorithm and data structure worth anything has bee…

Of course! But how are you going to know WHICH library function to use if you don't know what to look for in the first place? Knowing that a problem at hand requires a certain solution is important.

You use the one labeled "sort" and trust the standard library chose reasonable defaults. It's not like the standard lib is going to use bubble sort.

If the reasonable defaults aren't good enough... you're in the 10%.

Re: Algorithms

#46
post #42

why python???? ... any language with functions will do. I mean just create a java class with all public static functions if you want it to work like python (global functions). Its really language agnostic. Your answer will be a number a string or a list of things. All languages can do that. Im making an explicit opinion that python is no better than any other language for implementing algorithms. HN please prove me w…

Significant whitespace is great for technical interviews - you don't need to worry about matching brackets and whatnot. No brackets also means you have some more vertical space to work with on the whiteboard. Beyond that, if your interviewer is fluent in python, list comprehensions can greatly shorten the amount of boilerplate you have to write.

Amusingly, significant whitespace is the one reason I don't like using Python in whiteboard interviews - my handwriting is far from excellent on a board, and I don't want any ambiguity when reading my control flow.

I'll definitely second the list comprehension point, though. Between that and pleasant string support, a lot of standard interview answers are maybe 50% as long in python as Java. Not easier, necessarily, but faster to write and cleaner to read.

Re: Algorithms

#47
post #40
post #36

Earlier quoted context omitted.

If Python is the king, C is the court jester juggling knives. Done well it looks amazing, elegant, and efficient, but in the wrong hands you'll lose your hands.

Where is javascript in this medieval court?

[deleted]

Re: Algorithms

#48
I understand that the focus on sorting is to have a simple application that everyone can understand. But I can't seriously expect people to get that excited about sorting. I sure didn't. It's not like we don't have tons of other applications that demonstrate the same principles.

Re: Algorithms

#49
post #40
post #36

Earlier quoted context omitted.

If Python is the king, C is the court jester juggling knives. Done well it looks amazing, elegant, and efficient, but in the wrong hands you'll lose your hands.

Where is javascript in this medieval court?

JavaScript is the archbishop, evangelizing the holy trinity of React, Node.js and MongoDB.

Re: Algorithms

#50
post #44

This is an excellent course and helped me get my current job. My background is chemistry/chemical engineering. I had applied for a data scientist position. Phone interview included a problem where I was asked about my solution's complexity. I admitted I didn't know about it. Still got called back for an interview on site, but the weekend before I powered through this course. Unsurprisingly, it came up in the on-site…

And now in your current job how often are you evaluating the complexity and implementing specialized algorithms?

Implementing: never.

Evaluating: occasionally.

In my opinion, an understanding of data structures is _much_ more useful for a data scientist than algorithms.

Why should data scientists know about algorithms? Because data scientists are typically interviewed by computer scientists/software engineers, and that's what they tend to ask.

I recently conducted many phone and on site interviews for a data scientist position. I didn't ask about algorithms.

Post reply on HN