DEV Community

Cover image for Notes on algorithms

Notes on algorithms

Emilie Gervais on January 10, 2020

I'm doing CS50: Introduction to Computer Science on edx.org. I find it's a great way to review what I learn by completing, rewriting and sharin...
Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

I enjoyed the video immensely, by the way!

You may also consider looking into two more, both of which are among the fastest known sorting algorithms in existence.

  • Dual-Pivot Quick Sort (Yaroslavisky, Vladamir)
  • Timsort (Peters, Tim)
Collapse
 
hexangel616 profile image
Emilie Gervais

Thank you, I'll look into them! 😊👍

Collapse
 
jinglescode profile image
Jingles (Hong Jing)

It's encouraging to see you summarize what learn from courses, at the same time others can learn from you as well. Keep doing it 👍🏻

Collapse
 
jlohani profile image
Jayant Lohani • Edited

The best thing to test whatever you have learnt/studied is to share and explain others about it. It boosts confidence as well as help understand it better.
Came across these algorithms a year ago while studying C/C++. Thanks for refreshing these algorithms. Great notes for revision. ✌

Collapse
 
hexangel616 profile image
Emilie Gervais

I agree, but find it hard to find the time to do so in an interesting way sometimes. I guess it's an habit to take up as part of a learning & sharing routine. Like it should be done right after and/or before starting to learn something else.
Thanks to you for the positive comment. =)

Collapse
 
jlohani profile image
Jayant Lohani

Yeah that true. Its difficult to take out time. I am a beginner so trying my best to implement this habit from the beginning. The good thing about doing this is that the work is done more systematically and with focus. No one would work lazily or just for formality if he/she has to deliver that to a bunch of people afterwards. Also the quality will be maintained. And the best thing is that it would act as a revision /summary for him/her and others who would come across it. Its a win win situation for everyone. 🙂
Thanks for these notes. Hope to read more in future and gain knowledge. Great job and all the best.✌

Thread Thread
 
hexangel616 profile image
Emilie Gervais

Totally agree once again. 🙂
Thanks to you and all the best as well! 💮

Collapse
 
mah_khalafallah profile image
Mahmoud Khalafallah

I didn't get avoid overflow part

Collapse
 
hexangel616 profile image
Emilie Gervais • Edited

To prevent integer overflow for large numbers which could end up being too big to fit the integer's storage space.
en.wikipedia.org/wiki/Integer_over...
fresh2refresh.com/c-programming/c-...

Collapse
 
mah_khalafallah profile image
Mahmoud Khalafallah

Aha, I see
So we get the difference first and divide it by 2 then add it to the start.
instead of adding the start and the end.
But why we didn't do the same with the js example ?!

Thread Thread
 
hexangel616 profile image
Emilie Gervais

To highlight both possibilities? You don't always have to worry about overflow; When you do, it's nice to know there's a simple solution. These are just notes.

Collapse
 
heyrohit profile image
Rohit Gupta

:)