Hi, I'm Eli đź‘‹

@elibelly

Software Engineer at Twitter

(she/her)

Get your Computer Science degree

in 10 minutes*

@elibelly

*Here are some CS concepts that you might want to know exist or maybe clarify 

@elibelly

What is computer science?

@elibelly

The study of problem solving

Looking at a problem and working out a way a computer might be able to help you solve it.

@elibelly

  1. The scientific and practical approach to computation and its applications.
  2. The systematic study of the feasibility, structure, expression, and mechanization of the methodical procedures (or algorithms) that underlie the acquisition, representation, processing, storage, communication of, and access to information.

More formally...

@elibelly

we want to, like, get information or do stuff to it soo how do we science that and then make computers do all the work real fast

Which basically means...

@elibelly

Algorithms

@elibelly

What is an algorithm ? 

An unambiguous set of steps to complete a task or computation

 

It is very much like a recipe for a computer

@elibelly

Algorithm: Find the max 

Problem: Given a list of positive numbers, we need to return the largest number on the list.

Input: A list, "L", of positive numbers. This list must contain at least one number. 

Output: A number, "n", which will be the largest number of the list.

  1. Set "max" to 0.
  2. For each number x in the list L, compare it to max. If x is larger, set max to x.
  3. "max" is now set to the largest number in the list.

@elibelly

Algorithms & Computer Science 

  1. Does an algorithm actually exist to do a thing?
  2. Are we totally sure that the algorithm works for all possible inputs?
  3. How long does the algorithm take to run?
  4. How much memory space does it require?
  5. Once we know it’s possible to solve a problem with an algorithm, is the algorithm the best possible one. Can the problem be solved more quickly?

Answering some Qs

@elibelly

Time Complexity

The amount of time an algorithm takes to run in relation to the number of inputs

@elibelly

Big O Notation

A mathematical notation that describes a  measure of the execution of a function as the inputs approach infinity 

O( ? )

Example: O( 1 ) , O( n ), O( log n ) where n represents the number of inputs 

@elibelly

Let's say you want to watch a TV series...

Download Order Online

@elibelly

Let's say you want to watch a box set....

Download Order Online
10 episodes 10 hours 16 hours

@elibelly

Let's say you want to watch a box set....

Download Order Online
10 episodes 10 hours 16 hours
50 episodes 50 hours 16 hours 

@elibelly

Let's say you want to watch a box set....

Download Order Online
10 episodes 10 hours 16 hours
50 episodes 50 hours 16 hours 
n episodes n hours 16 hours
Time complexity O( n ) O( 1 )

Conclusion: Ordering Online is a more scalable algorithm!

@elibelly

What is the time complexity of searching for a maximum number in an array? 

[ 34, 7, 0, 4, 12, 11, 104, 3, 19 ]

O(n)

@elibelly

Data Structures

A data structure is a particular way of organizing data in a computer so that it can be used efficiently

  • Array*
  • Linked List
  • Stack*
  • Queue*
  • Tree*
  • Heap
  • Graph*
  • Hash Map

@elibelly

Stack

Queue

pop()

push(book)

enqueue(person) //add

dequeue()

//remove

đź‘€peek()

🤔isEmpty()

đź‘€peek()

🤔isEmpty()

LIFO

Last In, First Out ordering

FIFO

First In, First Out ordering

@elibelly

Trees

Graphs

Node-based data structures. A tree is a type of graph.

@elibelly

Analyzing Time Complexity of Algorithmic Operations on Data Structures

(adding it all together)

@elibelly

Doing things to information

  • Search
  • Sort
  • Insert
  • Find
  • Delete

@elibelly

Algorithm: Find the max 

Problem: Given a list of positive numbers, we need to return the largest number on the list.

Input: A list, "L", of positive numbers. This list must contain at least one number. 

Output: A number, "n", which will be the largest number of the list.

  1. Set "max" to 0.
  2. For each number x in the list L, compare it to max. If x is larger, set max to x.
  3. "max" is now set to the largest number in the list.

@elibelly

Unsorted Array

Binary Search Tree

[ 3, 5, 20, 11, 8 ]

[ 8, 3, 11, 5, 20 ]

3

20

11

8

5

Time Complexity O(n)

Time Complexity O(log n)

Sorted Array

Unbalanced Tree

[ 20, 11, 8, 5, 3 ]

Time Complexity O(1)

20

11

8

5

Time Complexity O(n)

@elibelly

Other Topics in Computer Science

  • Programming Language Theory 

  • Artificial Intelligence

  • Databases

  • Networking

  • Graphics

  • Cybersecurity

  • Human-Computer Interaction

  • Operating Systems

  • Compiler Theory 

  • Distributed Systems

  • Boolean Logic

  • Number Theory

  • Game Theory

  • Bioinformatics

  • Big Data

@elibelly

đź‘‹

THANKS!

@elibelly

Made with Slides.com