let's start Code

Round Trip

Share:

Maximum Number of Points in a Line

Share:

A* search algorithm

Share:

Manachar’s Algorithm

Share:

Expression parsing

Share:

Lyndon factorization

Resources:

CP_Algorithms 

visualize 

wikipedia 

Problem link: 719 - Glass Beads 

Solution:

 

Share:

Sereja and Salesman

Problem Link: SEAKAM

Topic: Bitmask Dp

Explanation: GKCS

implementation:


Share:

Suffix Automaton

Share:

Palindromic Tree

Share:

Suffix Tree

Share:

D - Coloring Edges on Tree

Problem link: Coloring Edges on Tree

Explanation: GfG

Implementation:


Share:

ICPC Dhaka Regional- 2019

Share:

1178 - Trapezium

Problem link: 1178 - Trapezium 

Explanation: math-only-math.com 

Code:

 

Share:

Slinding Window

Share:

1118 - Incredible Molecules

Problem link: 1118 - Incredible Molecules

Topic: Geometry

Resources:

Robert Eisele

Matrix.Code

Code:


Share:

Array and simple queries

Problem link: Array and simple queries

Topic Name: Treaps

Code:

Share:

Basic Geometry

Share:

CLOPPAIR - Closest Point Pair

problem link: CLOPPAIR

Topic: Closest Point Pair

Implementation:


Share:

Pick’s Theorem

Problem link: 1418 - Trees on My Island / (UVA – 10088)

topic: picks theorem

Implementation:


Share:

Lagrange polynomial

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 not a bridge, it has to be in a cycle, and since all edges in this cycle won't become bridges anymore, you have to create the largest possible cycle, so find the longest path in the tree, and connect it's endpoints. Final answer is : Total number of bridges — length of resulting cycle + 1
Which is equal to : Total number of bridges — longest path in tree.

 

Share:

ICPC Dhaka Regional Preliminary Contest, 2019

Share:

RabinKarp

Share:

E. Tetrahedron

Explanation: tetrahedron, rachitJain


Share:

CodeMonk (Dynamic Programming Part- I )

Share:

Cut the sticks

Problem link: Cut the sticks


Share:

Find if a string is interleaved of two other strings

Share:

Cutting a Rod

Cutting a Rod


Tushar Roy Video 

Medium blog post 

Implementation 01:


 

 Aplication:


 

Share:

Edit Distance

Share:

Word Wrap Problem (text justification)

Share:

Some Basic DP Problem Solution

Share:

Program for Fibonacci numbers

Code:


Share:

C. Codejamon Cipher

Share:

0/1 KnapSack

Resources:

 GeeksForGeeks

HackerEarth 

Codeforces 

CF blog 

 

Code:


 

Code: (When Knapsack size is large)

 

 

 

ProblemList:

B. Checkout Assistant 

UVA 

A2Online Judge 

 

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 and Statistic

POSTERIN - Postering

RPLN - Negative Score

CITY2 - A Famous City

DIFERENC - DIFERENCIJA

E. Turn Off The TV

D. Map

E. Awards For Contestants

C. Longest Regular Bracket Sequence

Disjoint Set Union

1671. Anansi's Cobweb 

D. Roads not only in Berland 

1003. Parity 

CHAIN - Strange Food Chain 

CLFLARR - COLORFUL ARRAY 

Fenwick Tree


12086 - Potentiometers

1112 - Curious Robin Hood

1266 - Points in Rectangle

Gravel

CTRICK - Card Trick

MATSUM - Matrix Summation

DQUERY - D-query

NKTEAM - Team Selection

YODANESS - Yodaness Level

SRM 310 - FloatingMedian

ADABEHIVE - Ada and Behives

Counting In Byteland

DCP-300: Shan and String

E. Little Artem and Time Machine

E. Hanoi Factory

TULIPNUM - Tulip And Numbers

SUMSUM - Enjoy Sum with Operations

SGIFT - Sabbir and gifts

TPGA - The Permutation Game Again

ZIGZAG2 - Zig when you zag

CRAYON - Crayon

DCEPC705 - Weird Points

DCEPC206 - Its a Murder!

KOPC12G - K12-Bored of Suffixes and Prefixes

TRIPINV - Mega Inversions

C. Subsequences

D. Ball

J. The Kamphaeng Phet's Chedis

E. Garlands

E. Inversions After Shuffle

D. Cairo Market

E. Goodbye Souvenir

ADACABAA - Ada and Species

A. Thor

F - Fundraising

Sqrt Decomposition

UVA - 12003 - Array Transformer    SOLUTION

UVA - 11990 Dynamic Inversion   SOLUTION

GIVEAWAY 

C. Till I Collapse 

D. Destiny 

E. Holes 

E. XOR and Favorite Number 

D. Powerful array      SOLUTION

DQUERY 

Segment Tree



Treap (Cartesian tree)

ADAAPHID 

ADACROP 

E. Radio stations 

COUNT1IT 

IITWPC4D 

ALLIN1 

D. Dog Show 

D. Yet Another Array Queries Problem   SOLUTION

MEANARR 

TWIST 

KOILINE 

PRESTIGE 

Sqrt Tree

Product on the segment by modulo 

Editorial: 1 2 3

 

Deleting from a data structure in O(T(n)logn) 

A. Connect and Disconnect 

E. Addition on Segments 

F. Extending Set of Points        SOLUTION

 

 

 

 

 

Share:

Sparse Table

Note: Sparse Table is a data structure, that allows answering range queries. It can answer most range queries in , but its true power is answering range minimum queries (or equivalent range maximum queries). For those queries it can compute the answer in time.

The only drawback of this data structure is, that it can only be used on immutable arrays. This means, that the array cannot be changed between two queries. If any element in the array changes, the complete data structure has to be recomputed.

Rsources:

Tanvir's Blog

E-maxx 

 GeeksForGeeks

HackerEarth 

Tushar Roy Video 

 Topcoder

Codechef

adilet.org_blog_sparse-table 

Implementation: according to (This )  problem 

 

Share:

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

E. Cyclic Components

resource

হিন্টঃ প্রতিটি কম্পোনেন্ট এ চেক করবো তাদের প্রত্যেকটি নোডের ডিগ্রি দুই কিনা, যদি দুই হয় তাইলে সেটা একটা সিঙ্গেল সাইকেল কম্পোনেন্ট।


Share:

E-maxx training part - 03

Share:

FACT0 - Integer Factorization (15 digits)

FACT0 - Integer Factorization (15 digits)

টপিকঃ প্রাইম ফ্যাক্টর

হিন্টঃ সিভ দিয়ে করলে টাইম লিমিট, নরমালি করতে হবে। প্রথমে x = ২ দিয়ে যতবার যায় ভাগ তারপর ৩ দিয়ে , এরপর ৫  দিয়ে...

যখন x*x >N হয়ে যাবে তখন লুপটা ব্রেক হবে।

 এরপর শেষে সংখ্যাটি ১ এর চেয়ে বড় থাকলে ওইটা একটা  প্রাইম নাম্বার হবে, আর প্রতিবার ভাগ করার সময় একটা কাউন্ট রাখবো যেইটা দ্বারা বুঝবো ওইটা ওই প্রাইম ডিভিজর এর কাউন্ট।😀

কোডঃ

 

Share:

1112 - Curious Robin Hood

Share:

Mixing Milk

Mixing Milk

Topic: Greedy

Share:

PON - Prime or Not (Miller Robin)

Share:

Primes Counts 1 to n

Share:

Is Fibo

Share:

CEQU - Crucial Equation

Share:

10104 - Euclid Problem

Share:

GCD and LCM

Share:

E-maxx training part - 01

Share:

About

let's start CODE

Popular Posts