Giter Club home page Giter Club logo

lets-practice-data-structures's Introduction

Datastructures Matter

Maybe. I mean, I dunno - at this point we're all pulling standard library implementations of all of these things like 90% of the time. But they do matter in interviews. And if you're prepping for an interview, you should practice them. Your interviewer wants you to be able to rattle off a simple linked list in 10 minutes so you can get on to actually solving the problem! But how? Do you read a bunch of articles about them? Maybe code one up in your free time? How will you know if you've done enough? How will you know if you're doing it right? Fast enough?

This. This is how you will know. Use TDD to implement your things.

How to use

Each of the directories in packages contains a series of skeleton implementations under src. Fill out the implementations, then run npm test to test them. You should get a nice output that opens in your browser to tell you which tests you've passed and failed. Keep going until you see all greens! If you get stuck, check out the reference implementations in lib.

Order

If you're new, start with Lists. Not only because it's a good place to start, but also because it's the only available datastructure currently.

Datastructures Available and Planned

Lists

  • Stack
  • Queue
  • ArrayList
  • SinglyLinkedList
  • DoublyLinkedList
  • SortedLinkedList
  • SortedArrayList

Trees

  • MinHeap
  • MaxHeap
  • BinarySearchTree
  • RedBlackTree
  • AVLTree

Sets

  • HashSet
  • TreeSet

Maps

  • HashMap
  • TreeMap

Graphs

  • WeightedGraph
  • DirectedAcyclicGraph

Contributing

Please do! Add your reference implementations to the lib folders, but keep in mind that this is an educational repository. Please be verbose with your implementations and your comments - long and clear variable and function names are preferred. Add your reference implementations to the appropriate tests and use npm run test-reference-impls.

lets-practice-data-structures's People

Contributors

dependabot[bot] avatar frankiethekneeman avatar glopez0909 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

glopez99 gastove

lets-practice-data-structures's Issues

A String is not an Error

Most of the reference implementations throw strings. This is an antipattern in JS, and we shouldn't be encouraging it.

Readme for Lists is Anemic

It could use descriptions of the various kinds of lists contained therein, as well as a suggested order.

README does not explain Big O notation

Big O Notation is a crucial piece of information for interacting with this repository. We should include some links on how to understand time complexity, space complexity, and big O notation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.