Skip to content

Some ideas for CS related topics #14

@ice799

Description

@ice799

Hi:

Following up on the issue about web-dev topics, I'm going to list some topics that would be great to consider for learning more about CS.

Data structures

The purpose of studying data structures is give yourself a framework for thinking through the different ways to store and organize data to solve a particular problem. In order to do this, becoming familiar with the common data structures, their tradeoffs, and various properties about them is critical.

When learning about data structures, make sure to understand some examples of when they are commonly used, what they are good or bad for, and the tradeoffs associated with them. Especially important in this is the so called Big-O notation.

Common data structures

  • Arrays
  • Linked lists
    • real world use: storing any type of data that can be represented as a list of objects.
  • Hash tables
    • real world use: Used as the primary data structure in many programming languages for looking up values based on keys.
  • Stacks
    • real world use: Programs on computers execute by using stacks.
  • Queues, Priority queues
    • real world use: Background workers for long running tasks are typically implemented as a queue.
  • Trees
    • real world use: Anything with a hierarchical structure can be implemented using trees; XML documents for example.
  • Tries
    • real world use: t-9 word autocompletion can be implemented using Graphs
  • Graphs
    • real world use: GPS mapping / turn-by-turn directions can be implemented using Graphs

For all the above data structures, I would recommend implementing them (except maybe arrays since they are built-in), and thinking about:

  • How is this data structure typically used?
  • What is this data structure good for? What is this data structure bad at?
  • Cache locality vs memory usage
  • How long (in big-O notation) does it take to insert/remove/find/access/resize this data structure?

Common algorithms

I'll list some common algorithms and the data structures typically associated with that algorithm:

  • Insertion sort, selection sort, bubble sort (arrays, lists)
  • mergesort, quicksort (arrays, lists)
  • Binary search (arrays)
  • Breadth first search (trees, graphs)
  • Depth first search (trees, graphs)
  • Inorder, preorder, postorder tree traversals (trees, graphs)
  • A* search (graphs)
  • Dijkstra's algorithm (graphs)

The algorithms above are extremely common algorithms and very useful for operating on the data structures described above. I would recommend implementing some of these algorithms to get a better understanding of how the algorithms work, understanding the (big-O) runtimes of the algorithms, and common problems that these algorithms can be used to solve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions