Tagged: computer science

November 3, 2017 in Research

Day 6, Algorithms: Sorting Algorithms in JavaScript

Algorithms have got a bad, scary, rap. And you know what? It's for good reason – understanding an algorithm is pretty doable, but implementing an algorithm in code of your own? It's hard. I went through writing some common sorting algorithms in JavaScript with lots of help from the Internet. Take a read!

(more ...)

November 1, 2017 in Research

Day 4, Data Structures: I Made a Hash Table

Apart from hashtags, my association with hashes is encrypting passwords in a database. That association is correct in terms of what a hash is, but there are also hash tables, hash functions, hash maps, and oh my gosh, more hash things for sure. Let's focus on a hash function and a hash table and building a rudimentary one in JavaScript.

(more ...)

October 31, 2017 in Research

Day 3, Data Structures: Stacks & Queues

Stacks and queues are quite similar in that they are both linear and abstract data structures (meaning they describe the behavior of a different data structure, like a linked list or array). All the action in terms of adding and removing items happens at their ends, and their main difference is in which end that adding/removing happens.

(more ...)

October 28, 2017 in Research

Day 1, Data Structures: Linked Lists

Linked lists are very similar to arrays in that they are a one-dimensional list of elements. Unlike arrays, however, in a linked list, you cannot just jump to index 4, you have to walk through the list, starting with the "head", or the first element in the list, and work your way through to the fourth element. They are very useful for lists where you need to add/remove elements, but not so useful if you need to search elements.

(more ...)