Competitive-Programming
Competitive-Programming copied to clipboard
This repository contains some useful codes, techniques, algorithms and problem solutions helpful in Competitive Coding. Join with me on telegram group https://t.me/joinchat/GL4Y8RREZbz-Cp78R869...
There is a fast algorithm to compute (a^b)%c in O(log N) time rather than O(b). Can I work on this issue?
The idea is to precompute factorials and inverse factorials and finally answer it in O(1) time.
Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks.
# Based on hash calculation of string. 1 .Calculation of hash (polynomial rolling hash function). 2 .Using hash calculated to Search for duplicate strings in an array of strings in...
Many operations can be performed on a given binary tree which are useful in competitive programming problems . I am interested to implement pre-order , post-order and in-order traversal ,...