let's start Code

Round Trip

Problem Link: Round Trip Resources: Checking a graph for acyclicity and finding a cycle in O(M)  Detect cycle in an undirected graph using BFS  Detect cycle in an undirected graph    Implementation: This file contains bidirectional Unicode text that...
Share:

Maximum flow problem

Resources: wikipedia.org ম্যাক্সিমাম ফ্লো (১) ম্যাক্সিমাম ফ্লো (২) Topcoder tutorial link One problem solution discussion CP Algorithms Implementation: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below....
Share:

Maximum Number of Points in a Line

Resources:  wikipedia.org ==>> Collinearity GFG  How To Determine If Points Are Collinear In Coordinate Geometry?  Collinear  Maximum Number of Points in a Line  Implementation basis Spoj & Codechef problem: This file contains bidirectional...
Share:

A* search algorithm

Resources: wikipedia.org ==> A*_search_algorithm hackerearth blog GFG stanford.edu hackerrank Problems implementation from Youtube Video: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review,...
Share:

Blogs link

1. Note Book  2. A Bunch of Stuff  3. forthright48  4. Jinatul Islam Morol  5. rahul-walkar  6. karan juhar  7. gautamdp.blogspot  8. A Simple Blog  9. ProgrammerSought  10. turing13  11. sohojeprogramming  12. one-problem-a-day 13. UnLucky Codes 14. Amman007 blo...
Share:

Manachar’s Algorithm

resources: HackerEarth Tushar Roy  Manacher's Algorithm - Finding all sub-palindromes  IDeserve  LeetCodeProblem Visualize  GFG  Problems: LPS - Longest Palindromic Substring  CF blog   Cf blog 2  Build a Palindrome   Implementation: ...
Share:

Expression parsing

Resources: Cp_Algorothm Problem Link: 1309 - Children`s Math 1324 - Equivalent Boolean Expressions Implementation: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor...
Share:

Lyndon factorization

Resources: CP_Algorithms  visualize  wikipedia  Problem link: 719 - Glass Beads  Solution: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor...
Share:

Sereja and Salesman

Problem Link: SEAKAM Topic: Bitmask Dp Explanation: GKCS implementation: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. ...
Share:

Suffix Automaton

Resources: cp-algorithms saisumit implementation CF-blog Good blogs Implementation: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode...
Share:

Palindromic Tree

Resources: adilet.org-palindromic-tree  Rezwan's CP Blog  Cf blog1  Cf-blog02  geeksForGeeks  Eertree (or palindromic tree)  Problems: LPS  E. Palindromes in a Tree  TREEPAL  the-story-of-stringland  NUMOFPAL  The Number of Palindromes  Implementation: ...
Share:

Suffix Tree

Resources: Tushar Roy  CF blog  stanford.edu-lectures   Code library CP_algorithms  HackerEarth  GeeksForGeeks  blogs  TMP01-cc implementation  Implementation: This file contains bidirectional Unicode text that may be interpreted...
Share:

D - Coloring Edges on Tree

Problem link: Coloring Edges on Tree Explanation: GfG Implementation: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. ...
Share:

ICPC Dhaka Regional- 2019

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show...
Share:

1178 - Trapezium

Problem link: 1178 - Trapezium  Explanation: math-only-math.com  Code: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. ...
Share:

আহো-কোরাসিক(Aho-Corasick) অ্যালগোরিদম

Resources: return zero CP-Algorithms Codechef camp video GeeksForGeeks open genus toptal/aho-corasick-algorithm CFblog-1  Cfblog-2  CF_blog-3  A2Online judge probles list  Implementation: problem link This file contains bidirectional Unicode text...
Share:

Slinding Window

Resources: GeeksforGeeks medium techiedelight.com leetcodeProblem  Explanation Some Example: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden...
Share:

1118 - Incredible Molecules

Problem link: 1118 - Incredible Molecules Topic: Geometry Resources: Robert Eisele Matrix.Code Code: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals...
Share:

Array and simple queries

Problem link: Array and simple queries Topic Name: Treaps Code: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more...
Share:

Basic Geometry

Basic Geometry This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ...
Share:

CLOPPAIR - Closest Point Pair

problem link: CLOPPAIR Topic: Closest Point Pair Implementation: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn...
Share:

Floyd-Warshall Algorithm

Resources: গ্রাফ থিওরিতে হাতেখড়ি ১০: ফ্লয়েড ওয়ার্শল CP-Algorithms ইকরাম মাহমুদ smilitude Implementation: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals...
Share:

Pick’s Theorem

Problem link: 1418 - Trees on My Island / (UVA – 10088) topic: picks theorem Implementation: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode...
Share:

Z Algorithm

Resources: tushar roy Z-function and its calculation  Shakil Ahmed (bangla blog)  Animation Linear-time pattern matching. Z-values and Z-algorithm Finish of Linear-time pattern matching Z Algorithm ( HackerEarth) GeeksforGeeks pdf Ivan Yurchenko blog   Implematation: ...
Share:

Knuth–Morris–Pratt algorithm

Resources: স্ট্রিং ম্যাচিং: নুথ-মরিসন-প্র্যাট (কেএমপি) অ্যালগরিদম  LoveExtendsCode  Tanvir blog  KMP অ্যালগোরিদম  Tushar Roy  KMP (E-maxx) Knuth-Morris-Pratt algorithm  TopCoder blog  medium blog   BTech blog  Implementation:  ...
Share:

Lagrange polynomial

Lagrange polynomial Problem link: F. The Sum of the k-th Powers This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more...
Share:

2015 ACM Amman Collegiate Programming Contest ( H.Bridge)

Problem link: H. Bridges Idea:   First, find all bridges in the given graph, then remove them from the graph and find all components of the resulting graph. Consider each component as a single vertex and add the bridges again, now you have a tree where all edges are bridges (in the original graph).In the resulting tree, to make an edge...
Share:

Solve Again

Solve these problems again another time: 1. Yet Another Substring Reverse (1) 2. Special Permutations (1)  3. E. New Year Tree (1)  4. D. Powerful array (2)  5. F - Distinct Numbers (1)  6. F - Xor Sum 3 (1)  6. E. Rock Is Push (1)  7. F. Tree Factory (1)  8. F. Daniel and Spring Cleaning(1)&nbs...
Share:

Hashing

 Resources: Threads @ IIIT Hyderabad Palindrome Substring Queries Palindrome Substring Queries Implementation CF blog CF blog E-maxx uniqeSubstring Implementation  group identical implementation  Problems: Substring Search  1517. Freedom of Choice ADAPHOTO - Ada and Terramorphing  Minimal Shift  Cyclic...
Share:

ICPC Dhaka Regional Preliminary Contest, 2019

B. The Social Network This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ...
Share:

RabinKarp

Resource: Tushar Roy Abdul Bari GeeksForGeeks E-maxx Implementation: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. ...
Share:

Lowest Common Ancestor

 Resource: লোয়েস্ট কমন অ্যানসেস্টর Lowest Common Ancestor, Binary Lifting and HLD  copsiitbhu.co.in  Lowest Common Ancestor - O(N−−√) and O(logN) with O(N) preprocessing Lowest Common Ancestor - Binary Lifting Lowest Common Ancestor - Farach-Colton and Bender Algorithm Solve RMQ (Range Minimum Query) by finding LCA...
Share:

E. Tetrahedron

Explanation: tetrahedron, rachitJain This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode...
Share:

CodeMonk (Dynamic Programming Part- I )

CodeMonk (Dynamic Programming Part- I )   This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional...
Share:

Cut the sticks

Problem link: Cut the sticks This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ...
Share:

Find if a string is interleaved of two other strings

 Find if a string is interleaved of two other strings This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about...
Share:

Cutting a Rod

Cutting a Rod Tushar Roy Video  Medium blog post  Implementation 01: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode...
Share:

Edit Distance

Edit Distance This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ...
Share:

Word Wrap Problem (text justification)

Resources: Tushar Roy Video   LeetCode Video MIT Lecture  Github link  Code:   This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor...
Share:

Longest Increasing Subsequence (LIS)

Resource: Longest Increasing Subsequence (GFG)  LIS and variation   ডাইনামিক প্রোগ্রামিং এ হাতেখড়ি-৪  Problem: 990 - Diving for Gold  1501. Sense of Beauty  1167. Bicolored Horses  231 - Testing the CATCHER  10926 - How Many Dependencies?  10000 - Longest Paths  XMEN   SOLUTTION 10635...
Share:

Some Basic DP Problem Solution

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show...
Share:

Program for Fibonacci numbers

Code: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ...
Share:

কয়েন চেঞ্জ + রক ক্লাইম্বিং

ডাইনামিক প্রোগ্রামিং এ হাতেখড়ি-৩ (কয়েন চেঞ্জ + রক ক্লাইম্বিং) Problem: 1017. Staircases 11331 - The Joys of Farming 11137 - Ingenuous Cubrency  Others Problem Solution: This file contains bidirectional Unicode text that may be interpreted or compiled differently than...
Share:

Treap (Cartesian tree)

Resources: E-maxx Algorithms Thread Episode 9: Treaps  carpanese blog  quora-Part-1  Part 2  Cf blog 0  CF Blog 1  CF blog 2 Cf blog 3  Cf blog 4  ACM Cairo Science   Youtube: 2.5+ hours lecture  Algorithm Live  Implementation:        ...
Share:

Sqrt Decomposition

Resoures: E-Maxx Shafayet blog  Rezwan's CP Blog   Anudip blog  Tanvir's Blog  MO'S Algo  One problem-solution discussion 2D SQRT  MO’s Algorithm (Query square root decomposition) Mo's algorithm (HackerEarth) GeeksForGeeks CF blog: 1 2 Cf blog3  CF blog4 [Tutorial] Two ways to apply Mo's...
Share:

C. Codejamon Cipher

C. Codejamon Cipher Explanation: Google Dynamic Programming Problem (APAC 2017 Round D)  Code:   This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor...
Share:

0/1 KnapSack

Resources:  GeeksForGeeks HackerEarth  Codeforces  CF blog    Code: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor...
Share:

E-maxx training part - 04

Minimum stack / Minimum queue Implementation  Sparse Table RMQSQ - Range Minimum Query   SOLUTION THRBL - Catapult that ball Matchsticks Sereja and D D. CGCDSSQ D. R2D2 and Droid Army B. Maximum of Maximums of Minimums TNVFC1M - Miraculous DCP-19: Multiplication Interval D. Animals and Puzzle E. Trains...
Share:

Sparse Table

Note: Sparse Table is a data structure, that allows answering range queries. It can answer most range queries in span class="MathJax" data-mathml="O(log⁡n)" id="MathJax-Element-1-Frame" role="presentation" style="position: relative;" tabindex="0">O(logn), but its true power is answering range minimum queries (or equivalent range maximum...
Share:

Github Link

RezwanArefin01 Shafaet  ACM-ICPC-Algorithms  ADJA/algos  USACO  Ashishgup1/Competitive-Coding  abeaumont/competitive-programming  keon/algorithms (But, codes in python)  GitHub Repositories With Competitive Programming Libraries  &nbs...
Share:

Chinese Remainder Theorem

Resources: Chinese Remainder Theorem  Chinese Remainder Theorem ( E-Maxx)   GeeksForGeeks  forthright48 - Coprime Moduli part1   forthnight48- Non Coprime Moduli part 2  Codeforces article Problems: Chinese Remainder Theorem (non-relatively prime moduli)  Cheese and Random Toppings    SOLUTION  1319...
Share:

Longest Common Subsequence ( LCS )

Resources: ডাইনামিক প্রোগ্রামিং: লংগেস্ট কমন সাবসিকোয়েন্স GeekGeeks  Practice Dynamic Programming! Educational DP Contest: F - LCS  Tushar Roy Video DP: Find elements of LCS ( Hackerrank Problem )   Code: This file contains bidirectional Unicode text...
Share:

Number of single cycle components in an undirected graph (CF-977E)

E. Cyclic Components resource হিন্টঃ প্রতিটি কম্পোনেন্ট এ চেক করবো তাদের প্রত্যেকটি নোডের ডিগ্রি দুই কিনা, যদি দুই হয় তাইলে সেটা একটা সিঙ্গেল সাইকেল কম্পোনেন্ট। This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears...
Share:

E-maxx training part - 03

Modular Multiplicative Inverse UVa 11904 - One Unit Machine      SOLUTION Longest Increasing Subsequence Arrays  SOLUTION C. Beautiful Numbers  F. The Sum of the k-th Powers  A. Festival Organization  D. Nephren Runs a Cinema    Chinese Remainder Theorem Number of Sequences  E....
Share:

FACT0 - Integer Factorization (15 digits)

FACT0 - Integer Factorization (15 digits) টপিকঃ প্রাইম ফ্যাক্টর হিন্টঃ সিভ দিয়ে করলে টাইম লিমিট, নরমালি করতে হবে। প্রথমে x = ২ দিয়ে যতবার যায় ভাগ তারপর ৩ দিয়ে , এরপর ৫  দিয়ে... যখন x*x >N হয়ে যাবে তখন লুপটা ব্রেক হবে।  এরপর শেষে সংখ্যাটি ১ এর চেয়ে বড় থাকলে ওইটা একটা  প্রাইম নাম্বার হবে, আর প্রতিবার ভাগ করার সময় একটা কাউন্ট রাখবো...
Share:

প্রাইম জেনারেশন সিভ ও প্রাইম ফ্যাক্টরাইজেশন

Resources: প্রাইম জেনারেশন সিভ ও প্রাইম ফ্যাক্টরাইজেশন  Integer factorization  This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden...
Share:

1112 - Curious Robin Hood

1112 - Curious Robin Hood Topic: BIT This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional...
Share:

E-maxx training part - 02

Primality tests PON - Prime or Not   Solution Integer factorization  FACT0 - Integer Factorization (15 digits) Solution FACT1 - Integer Factorization (20 digits)   FACT2 - Integer Factorization (29 digits) GCPC 15 - Divisions  Euler's totient function ETF - Euler Totient...
Share:

Mixing Milk

Mixing Milk Topic: Greedy This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode...
Share:

PON - Prime or Not (Miller Robin)

PON - Prime or Not Topic: Miller Robin  Resource:   Primality Test | Set 3 (Miller–Rabin)  Miller Robin    This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below....
Share:

Primes Counts 1 to n

Block sieving This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ...
Share:

Nth Fibonacci Number

Resource Fibonacci no in O(log N) time  Solving the Fibonacci Sequence with Matrix Exponentiation  An amazing way to calculate 10^18-th fibonacci number using 25 lines of code.    This file contains bidirectional Unicode text that may be interpreted...
Share:

Is Fibo

Is Fibo Topic: Fibonacci This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode...
Share:

CEQU - Crucial Equation

CEQU - Crucial Equation  Topic: Linear Diophantine Equation   This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. ...
Share:

10104 - Euclid Problem

10104 - Euclid Problem                       Resources Extended Euclidean Algorithm  এক্সটেন্ডেড ইউক্লিডীয়ান অ্যালগোরিদম Extended Eu  Modular Arithmetic for Beginners       ...
Share:

GCD and LCM

GCD and LCM This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ...
Share:

E-maxx training part - 01

                         Binary Exponentiation 1230 - MODEX              Solution 11029 - Leading and Trailing     Solution I. Parking Lot LASTDIG - The last digit  LOCKER...
Share:

About

let's start CODE

Popular Posts