Live data from Hacker News

Algorithms

khanacademy.org

31–40 of 163 posts

Re: Algorithms

#31
post #14

Another great resource I highly recommend: https://www.manning.com/books/grokking-algorithms

I didn't care for this book. I found though the use "doodle drawings" for visualization to be hard to look at and distracting. The book felt half-finished to me. For instance how does an algorithms book not include anything on trees?

I think a much better and free alternative is:

http://interactivepython.org/runestone/static/pythonds/index...

Re: Algorithms

#32
If you have the KA app installed this link opens in it!

Which is great, except it takes you to the main list of subject matters, and algorithms isn't in there.

So I'm not able to view this link on my iPad unless I uninstall KA?

Re: Algorithms

#33
Am I the only one to think that, for anyone capable of making it through the course, the introduction is incredibly patronising?

Not just the everyday examples of what constitutes an algorithm, but the voice, presentation, etc.

Re: Algorithms

#34
It's hard to pick one thing to tell budding developers they have to learn but Big-O notation is definitely up there.

The follow up to that is understanding what you're counting and why, i.e. branches v.s. statements v.s. dereferences v.s. logical I/Os v.s. physical I/Os ...

Re: Algorithms

#35
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 wrong in an objective way so we may all learn?

Re: Algorithms

#36

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…

Python is the algorithm king as far as I'm concerned. It really gets out of your way and lets you focus on the abstract nature of what you're trying to accomplish.

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.

Re: Algorithms

#37

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…

> why python???? ... any language with functions will do.

it will. and this person chose python.

> HN please prove me wrong in an objective way so we may all learn?

no one cares about the choice of language. This is about learning algorithms.

Re: Algorithms

#38
post #2

as someone who doesn't know much about this and is trying to join the tech community, what will I achieve through this?

Let's say you are writing a python program, and you want to simply check if an element is in a list. So, you build a list and then check if 'd' is in the list:

  mylist = ['a','b','c','d'].  
  if 'd' in mylist:
      ...
This works just fine, however, the time it takes, to find the item, grows proportional to the number of items in the list. If your list grows to 1000 items, and the item you are searching for is positioned last, python will check 1000 times. This is known as O(N).

Now, how does the performance compare, when using a set data structure?

  myset = ('a','b','c','d')
  if 'd' in myset:
    ...
Well, underneath the hood, the set stores the data in what's known as a hash. The time it takes to check if an item is (or isn't) in a list does not grow proportional to the number of items in the list—it's always constant: O(1).

Re: Algorithms

#39
post #36

Earlier quoted context omitted.

Python is the algorithm king as far as I'm concerned. It really gets out of your way and lets you focus on the abstract nature of what you're trying to accomplish.

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.

It also forces you to know what's happening under the hood though. If learning the material comprehensively is your goal I think it's not a bad idea to dig in to a c implementation.

Re: Algorithms

#40
post #36

Earlier quoted context omitted.

Python is the algorithm king as far as I'm concerned. It really gets out of your way and lets you focus on the abstract nature of what you're trying to accomplish.

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?
Post reply on HN