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-Cp78R869CQ
C++ 61.00%Java 15.87%Python 11.17%C 10.37%JavaScript 1.25%Haskell 0.35%
1 .Calculation of hash (polynomial rolling hash function).
2 .Using hash calculated to Search for duplicate strings in an array of strings in O(nm+nlogn) time.
Based on hash calculation of substring.
Pattern matching in a string in O(n) time (Rabin-Karp ).
Calculating the number of different substrings of a string in O(n2 logn).
Euler Totient function is a function that gives the number of coprime integers from 1 to N. This algorithm will compute the number of coprime integers for any given N in sqrt(N) time. I would like to work on this.
#finding queries based on range .
1.sum of range of queries.
2.min. in the range.
3. max in the query.
4. gcd of the range.
All queries in O(logn) and building time is O(n)
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 , finding height , mirror image and copy of a binary tree .