Skip to content

Practice for competitive programming to become a better problem solver. Includes brief explanations and solutions to interesting CS problems.

License

Notifications You must be signed in to change notification settings

kennethtegrado/competitive-programming-practice

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


No logo yet

Competitive Programming Practice

Let's embark on a journey to solve competitive programming problems!
Explore the docs »

· Report Bug · Request Feature

Table of Contents
  1. Introduction
  2. Directory Structure
  3. Getting Started
  4. General Guidelines
  5. Contributing
  6. Resources
  7. License
  8. Contact
  9. Acknowledgments

Introduction

Welcome to my competitive programming practice repository! This repository contains my solutions to a variety of data structures, algorithms, and problems from popular online judges such as Codeforces, AtCoder, LeetCode, Kattis, etc. This repository is intended to serve as a resource for other competitive programmers who want to learn from my solutions or use them as a reference for their own coding practice.

Each problem solution includes a description of the problem, my approach to solving it, and the source code for my solution. The solutions are organized by difficulty level, data structure, algorithm, and online judge for easy navigation.

I hope that you find this repository helpful in your own journey as a competitive programmer. If you have any questions or suggestions for improvement, please feel free to reach out to me!

(back to top)

Directory Structure

.
├── README.md
├── algorithms
│   ├── trivial
│   ├── ad_hoc
│   ├── search
│   ├── greedy
│   ├── divide_and_conquer
│   ├── dynamic_programming
│   ├── graph
│   ├── mathematics
│   ├── strings
│   ├── geometry
│   └── readme.md
├── data_structures
│   ├── [data_structure_name]
│   │   ├── [implementation].cpp
│   │   ├── readme.md
│   ├── ...
│   └── readme.md
├── online_judges
│   ├── leetcode
│   ├── atcoder
│   ├── codeforces
│   ├── kattis
│   └── readme.md
└── online_judges
│   ├── leetcode
│   ├── atcoder
│   ├── codeforces
│   ├── kattis
│   └── readme.md
└── contests
    ├── codeforces
    │   ├── [contest_code]
    │   │   ├── [implementation].cpp
    │   │   └── readme.md
    │   └── ...
    ├── atcoder
    │   ├── [contest_code]
    │   │   ├── [implementation].cpp
    │   │   └── readme.md
    │   └── ...
    └── ...
  • readme.md: This file should contain an introduction to the repository and any relevant information about how to use it.
  • algorithms: This directory contains subdirectories for various algorithm categories such as trivial, ad_hoc, search, greedy, divide_and_conquer, dynamic_programming, graph, mathematics, strings, geometry, etc. Each subdirectory contains solutions to problems that belong to that particular algorithm category. The readme.md file for this subdirectory categorizes all algorithms inside this folder to easy, medium, hard, and advance so that you can explore these problems progressively.
  • data_structures: This directory contains subdirectories for different data structures. Each subdirectory contains one or more implementations of that data structure along with a readme.md file that describes the data structure and provides information about the implementations.
  • online_judges: This directory contains subdirectories for popular online judges such as leetcode, atcoder, codeforces, kattis, etc. Each subdirectory contains solutions to problems from the corresponding online judge. The readme.md file for this subdirectory categorizes all algorithms inside this folder to easy, medium, hard, and advance so that you can explore these problems progressively.
  • contests: This directory contains subdirectories for different coding contests from codeforces, atcoder, etc. Each subdirectory contains subdirectories for each individual contest, and each contest subdirectory contains solutions to the problems from that contest. The solutions are organized by the problem's implementation and contain a readme.md file that describes the problem and solution.

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

To test out solutions

  • g++ compiler (I am using 11.3.0)

    g++ --version

Installation

  1. Clone the repo
    git clone https://github.com/kennethtegrado/competitive-programming-practice.git
  2. Have fun learning!

(back to top)

General Guidelines

  • To kickstart your journey in competitive programming, you may use template.cpp as a guide for a general program structure for solving a problem in competitive programming. All codes in this repository assumes that you are using the provided template.

  • To easily test inputs and outputs of your program. You may use this command when running your executable file. The test.in should contain the inputs that you are trying to test. The test.out file is automatically generated when you run this command in your terminal.

    ./a.out < test.in > test.out

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Branch in the Forked repository (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Resources

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @renz.ts - kentegrado@gmail.com

Project Link: https://github.com/kennethtegrado/competitive-programming-practice

(back to top)

Acknowledgments

I would like to thank these people for being my motivation and contributor for my journey in becoming a very competitive programmer!

  • Isaac Villamin
  • Vivekjeet Chambal
  • Perico Dionisio

(back to top)

About

Practice for competitive programming to become a better problem solver. Includes brief explanations and solutions to interesting CS problems.

Topics

Resources

License

Stars

Watchers

Forks