GithubHelp home page GithubHelp logo

deeptanshum / algorithms Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 435 KB

A repo of algorithms and data structures implemented while learning/revising algorithms and data structures, reading Introduction to Algorithms, practicing technical interview questions, etc.

License: MIT License

C++ 94.01% Python 5.99%

algorithms's Introduction

Algorithms

A repo of algorithms and data structures implemented while learning/revising algorithms and data structures, reading Introduction to Algorithms, practicing technical interview questions, etc.

Some examples:

  • Bellman-Ford's algorithm Implemented this algorithm, as explained in CLRS 24.1, to detect a negative cycle in a given graph. This was in the context of solving, partially, the general infinite arbitrage problem. The goal was to detect whether it's possible to start with one unit of currency, perform a series of exchanges and get more than one unit of the same currency

  • Dijkstra's algorithm Implemented Dijkstra's algorithm, as explained in CLRS 24.3, to find the minimum cost of a series of flights from one city to another.

  • Strongly Connected Components Implemented an algorithm, as explained in CLRS 22.5, to count the number of SCCs in a graph. This was in the context of solving a problem to check whether any intersection in a city is reachable from any other.

  • Prim's algorithm Implemented Prim's algorithm, as explained in CLRS 23.2, to solve a problem to optimally connect cities such that the distance between any two cities as well as the length of the road network connecting all cities is optimal

  • Used BFS to determine if graph is bipartite

  • Topological sort I implemented the topological sort procedure, as explained in CLRS 22.4, in the context of solving a problem to print a CS curriculum that was represented as a weighted graph.

  • Breadth first search A straightforward implementation of BFS to compute the minimum number of flight segments from one city to another.

  • Used DFS to determine if directed graph with weights contains a cycle. This was in the context of determining whether a given CS curriculum, represented as a directed graph, is valid.

  • Used DFS to determine if there's a path between 2 vertices. This was in the context of solving a problem to detect an exit from a maze.

algorithms's People

Contributors

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