Coder Social home page Coder Social logo

dsalgo's Introduction

  1. 01sumswap
  • hashmap
  1. 02mergesort
  • divide and conquer
  1. 03linkedlist
    • linked list data structure
  2. 04quicksort
    • sorting
  3. tbd
  4. tbd
  5. 07maxcontiguoussubsequence
    • save state to avoid recomputation
    • pre-process information into data structures
    • divide and conquer
    • scanning algorithms (esp. for problems on arrarys)
    • cumulatives
  6. 08graphtraversal
  • stack, queue
  1. 09queue
  • stack, queue
  1. 10onlinepoker
  • recursive to iterative
  1. 11countinversions
    • divide and conquer
    • extension to mergesort with sorting
  2. 12applestockprice
    • save state
    • pre-process
    • using itertools
    • greedy ("Suppose we could come up with the answer in one pass through the input, by simply updating the 'best answer so far' as we went. What additional values would we need to keep updated as we looked at each item in our set, in order to be able to update the 'best answer so far' in constant time?")
  3. 13stackelementlargest
  • think data structures + algorithms
  • greedy using state information
  1. 14heapsort
  • heap data structure
  • fencepost problems.
  1. 15bst
    • binary search tree
    • Some nice BST properties.
  2. 16encodedecodestrings/
    • Google Interviews Q
    • Python lists, .append, .join
    • Python None v/s False
    • Think before Code
  3. 17maxequality
    • foobar
    • find pattern through trials.
  4. 18stdinstdout
    • raw_input() for Python 2.7 v/s input() Python3.0
  5. 19nthnodefromend
    • Think multiple pointers to pre-process state.
    • Using Dummy Node at beginning may be helpful.
  6. 20coinchange
    • Dynamic Programming. Think Scanning..
    • Implementation of Multi-Dimensional Lists (without numpy)
  7. 21superbalanced
    • DFS on Trees
    • Dont hesitate in maintaining state to solve problems.
    • Iterative v/s Recursive. Stacks and Queues are cheap for iterative versions.
  8. 22arrayrotation
    • Bentley's Programming Pearls
    • Array Indexing and FencePost issues
  9. 23stockmaximize
    • To simplify, start with brute force. Think how to apply patterns : sort,scan,cumulative,hashing,greedy,divideconquer
    • Think before code. Slow down urge to code rightaway. Think of alternate strategies.
  10. 24friendcircles
    • (Two Sigma Pb)
    • Connected Components Problem
    • Converted adjacency matrix to a proper graph classes.
  11. 25stringchains
    • (Two Sigma Pb)
    • Dynamic Programming. Nice Problem.
    • Was hitting 1 error on a hidden test case.
  12. 26catalannumbers
    • Catalan numbers
  13. 27orderstatistics
    • (Rocket Fuel Pb)
    • Divide and Conquer. Is there a way to exploit some property of the problem so we have to solve a smaller problem ?
  14. 28lca

dsalgo's People

Contributors

abgoswam 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.