Giter Site home page Giter Site logo

data-structures-and-algorithms-study's Introduction

data-structures-and-algorithms-study

  1. Don’t spend too much time on the prep work.
  2. Don’t spend too little time on the prep work.

If you spend too much time studying, you’ll never get to solve Leetcode/CTCI problems. Conversely, you’ll be lost if you spend too little time on the prep work. It is important that you spend the right amount of time for the prep work to make sure that you do not waste your time.

Data Structures

https://medium.com/siliconwat/data-structures-in-javascript-1b9aed0ea17c -At a high level, there are basically three types of data structures.

  • Stacks and Queues are array-like structures that differ only in how items are inserted and removed.
  • Linked Lists, Trees, and Graphs are structures with nodes that keep references to other nodes.
  • Hash Tables depend on hash functions to save and locate data.

Algorithms

Prep work

Once you are comfortable with the data structures & algorithms above, do the following exercise multiple times (at least 2–3 times) until you can do them with your eyes closed.

  • Implement an ArrayList from scratch
  • Reverse a linked list
  • Implement a Stack & a Queue using Array
  • Implement a HashTable with simple Hashing functions
  • Implement a Graph using Adjacency List, and then write functions for BFS & DFS.
  • Write the binary search algorithm both recursively and iteratively
  • Write the merge sort algorithm
  • Write the quicksort algorithm
  • Print binary tree using DFS (in-order, preorder and post order — all three of them) and BFS.
  • Memorize time & space complexities for common algorithms. Here’s an interesting website.
  • Implement a trie.
  • Learn these important bit manipulation tricks. https://www.geeksforgeeks.org/bit-tricks-competitive-programming/

Resources

leetcode videos

practice

data-structures-and-algorithms-study's People

Contributors

hsien-hsiuliao avatar

Watchers

James Cloos avatar  avatar

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.