Code Monkey home page Code Monkey logo

competitive-coding's Introduction

Competitive Coding

This repository consists templates of some of the commonly used Data structures and Algorithms used in Competitive Programming competitions.

The codes only contains the required functions, or in some places classes/struct, which are required for the given problem. Header files and main functions are avoided unless required for explanantion. Complexity of every function is explained alongside with it.

Some of the programs/implementations have been written by me, others have been modified/copied from some sources or internet. In most of the cases the source has been mentioned too.

The folllowing are the contents of the repository :

  • C

This folder contains full implementations of the code, mostly done in data structures course at BITS Pilani. Random test for checking the code and also showing the usage is also present.

  • C++14

It contains templates only and comments explaining the complexity in terms of space and time. These can be used directly in your code when you require them. Just read the commments before so that you know where and how to use them. Since, I mostly code in C++ during competitions, it contains almost all the data structures and algorithms which one may require beside the "Standard template Library" already present in C++.

  • Python3

Till now it contains only Maths related implementations. It is very useful when overflow cases can occur in languages like C, C++.

  • Sublime Snippets

For help to sublime users, snippets for the most commonly used templates are also present. Just paste the Snippets folder in your package and snippets will automatically appear using tab triggers in your code.

Usage details

The code has been written such that no dependencies like typedef, defines etc. are required. So just paste the required templates and use them as per comments mentioned.

Are these implementations correct?

Yes, till date the above implementations have never given wrong results. Also, they have been optimised in terms of space and running complexity through testing on various problems across judges like Codechef, Codeforces, Spoj, Hackerearth, Hackerrank, UVA etc.

Contributing to repository

* You can even add your implemenatations and get it merged in the repository (as per guidelines).
  • If you feel something is not explained properly, you may raise an issue about it.

  • If you find something wrong in the above templates, raise an issue regarding it.

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.