Solutions and learning materials have been organized in a careful manner. One must follow the directory hierarchy to contribute in this repo. Organization is pretty simple. The following figure will make it clear:
- format:
{category_name}/{sub_category_name}/{oj_name}/{F+problem_id}/{Solution.ext}
- example:
data_structure/segment_tree/codeforces/F558E/Solution.c
- format:
{category_name}/{sub_category_name}/{oj_name}/{F+problem_name}/{Solution.ext}
- example:
data_structure/stack/hackerrank/FBalancedBrackets/Solution.c
- format:
{CONTEST}/{contest_name}/{Y+year}/{round_name}/{F+problem_name}/{Solution.ext}
- example:
CONTEST/codejam/Y2019/round01A/FAlienRhyme/Solution.c
- format:
{CONTEST}/{world_final}/{Y+year}/{F+problem_name}/{Solution.ext}
- example:
CONTEST/world_final/Y2017/FNeedForSpeed/Solution.c
format: {CONTEST}/{regional}/{Y+year}/{site}/{F+problem_name}/{Solution.ext}
example: CONTEST/regional/Y2017/dhaka/FMegaMind/Solution.c
format: {CONTEST}/{random_contest}/{Y+year}/{contest_name}/{F+problem_name}/{Solution.ext}
example: CONTEST/random_contest/Y2019/practice_for_preli/FLifeOfPhi/Solution.c
If there are multiple solutions, then name the second solution file as Solution001.{ext} such as Solution001.c, and third solution file as Solution002.py and so on ...
To add editorials for your solved problem, add a README.md file in the folder where you've put your Solution.cpp file.
[N.B.]:
Currently, we are working on structuring contents for providing learning method in an easy manner. So, if you want to contribute, you may have to wait until decisions are made. But if very eager to contribute, contact reyad.
Writing solutions and learning materials both are pretty easy. Both explained below in details.
-
source file must contain a working solution
-
at top of the source file you should add the followings(you must add these as "comment"):
- problem name (must)
- problem link (must)
- contest link (if exists otherwise put "(?)")
- time (good if you add, otherwise put "(?)")
- author (it's good to add author name)
-
below this you should two more things:
- other_tags: a problem may have various ways to solve, you should add those other tags
- difficulty_level: you should add one of the following (beginner, intermediate, expert, advanced)
Example:
// problem name: A Simple Task
// problem link: https://codeforces.com/contest/558/problem/E
// contest link: https://codeforces.com/contest/558
// time: (?)
// author: reyad
// other_tags: (?)
// difficulty_level: expert
#include <stdio.h>
#define N 100100
// put your code here
// ....
// ....
You can use templates, if you want. You may find the the solution templates here.
Writing editorials are easy as writing solutions. Just put a README.md file with your solution process in the folder where you've put Solution.cpp file. But, you must follow the rules for writing editorials. You've to add the followings to the editorial:
- problem link(must)
- contest link(if exists otherwise put "(?)")
- problem statement
- input constraint
- output constraint
- solution process(only theory, you must not provide any code)
It may seem complex, so we've provided a template for you. You may just copy-paste in proper formatting in that file. You may find the template here.
Writing tutorial is as easy as writing in markdown.
[N.B.]:
Currently, we are working on structuring contents for providing learning method in an easy manner. So, if you want to contribute, you may have to wait. But if very eager to contribute, contact reyad.
These conventions are accepted by everyone contributing and one must follow them properly.
These are the short-codes for "oj_name" that has been (and will be) used to create directory
- Codeforces: codeforces
- Codechef: codechef
- Timus: timus
- UVa: uva
- UVaLive: uvalive
- Hackerrank: hackerrank
- Hackerearth: hackerearth
- Lightoj: loj
- Spoj: spoj
- Leetcode: leetcode
- Project Euler: projecteuler
- Atcoder: atcoder
These are the short-codes for "category_name" and "sub_category_name" has been (and will be) used to create directory
- ad_hoc
- beginner
- constructive_algorithms
- implementation
- brute_force
- loop
- recursion
- backtracking
- search
- binary_search
- ternary_search
- sort
- insertion_sort
- merge_sort
- quick_sort
- amortized_analysis
- two_pointers
- math
- basic
- probability
- big_integer
- combinatorics
- number_theory
- non_overlapping_subproblem
- divide_and_conquer
- reduce and conquer
- dynamic_programming
- coin_change
- knapsack
- lis
- lcs
- matrix_chain_mul
- non_classical
- greedy
- basic
- non_classical
- data_structure
- array
- list
- stack
- queue
- heap
- segment_tree
- sqrt_decomposition
- treap
- graph
- bfs
- dfs
- scc
- articulation_point
- articulation_bridge
- sssp
- bipartite_matching
- max_flow
- string
- basic
- kmp
- trie
- computational_geometry
- basic
- convex_hull
- picks_theorem
- line_sweep
- hackercup
- codejam
- Codejam round name convention
- qualification
- round01A
- round01B
- round01C
- round02
- round03
- Hackercup round name convention
- qualification
- round01
- round02
- round03
More new categories and sub-categories are being introduced regularly and will be added according to needs later.
There is a few rules about how to properly send pull requests to this repo, so that it may easier for us to handle your requests properly. For pull request guidelines, read this guide.