Skip to content

Instantly share code, notes, and snippets.

@rogerwschmidt
Last active May 23, 2018 16:32
Show Gist options
  • Save rogerwschmidt/76017c12ce168d6754753031cbe9e466 to your computer and use it in GitHub Desktop.
Save rogerwschmidt/76017c12ce168d6754753031cbe9e466 to your computer and use it in GitHub Desktop.

Custom Data Structures Instructor Notes

Objectives

  • Define what data structures are and why they are useful
  • Define what sets and maps are
  • Implement a custom data structure

What are data structures, and why are they useful?

What are sets and maps

  • In pairs, research Javascript sets. What do they do, how are they useful?
  • In pairs, research Javascript maps. What do they do, how are they useful?

How do you implement a custom data structure

  • Create custom array data structure that you can specify the type allowed in it at constructions
class TypedArray{
  constructor(type){
    this.type = type
    this.data = []
  }
  push(val){
  
  }
  pop(){
  
  }
  get(id){
  
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment