Source: https://docs.google.com/presentation/d/1Duqu1CBYjHpw9JCJdp-scICFqaoIRud0/edit#slide=id.p1

Class Overview

  • Introduction to the basic data structures used in computer science:
  • Understand each data structure in detail
  • Analyze the algorithms that use them
  • Know limitations of each data structure
  • Practice designing and applying data structures to real world problems through coding.
  • Learn some Java as a programming language.

Why Java for Data Science?

  • Java is fast
  • Great for developing back end of machine learning algos
  • Has good selection of libraries:
  • For ML
  • Understand someone else’s code
  • Understand terminology
  • Resume looks better
  • For this class in particular

In Particular…

Efficiency

  • Good algorithms.
  • Good data structures.

Programming(efficiently)

  • Designing, building, testing, and debugging large programs.
  • Use of programming tools.
  • git, IntelliJ and JUnit
  • Java (not the main focus of this class)

Why Study Algorithms and Data Structures?

  • To find a job
  • To keep a job

Basic Rules of Java

All code in Java must be part of a class
For code to run you need to have

public static void main(String[] args)  

We mark the beginning and end of segments of code using { and }
All statements in Java must end in a semi-colon: ;

Before Java variables can be used, they must be declared
Java variable must have a specific type:

  • int, String, double, boolean etc
    Types can never change
    Types are verified before the code even runs
  • Big difference between Python and Java

Defining Functions - Basic Rules

Functions must be declared as part of a class in Java

  • A function that is inside a class is called a “method”
  • All functions in Java are methods
    To define a function in Java we use “public static”
  • Other ways are later
    All parameters must have a declared type
    Return value of the function must have a declared type
    Functions in Java return only one value