let's start Code

1002 - Country Roads

1002 - Country Roads

Topic: dijkstra

solution 01:


Share:

Dijkstra Algorithm

                                               Resource Link

Dijkstra Algorithm

Dijkstra on sparse graphs


Share:

1005 - Rooks

1005 - Rooks

Topic: combinatorics + Binomial Coefficient



Share:

Binomial Coefficient

Share:

DCP-23: Another Bigmod Problem

DCP-23: Another Bigmod Problem

Topic: BigMod

solution:


Share:

1067 - Combinations

1067 - Combinations

Topic: Counting.


Share:

F1. Tree Cutting (Easy Version

F1. Tree Cutting (Easy Version)

Topic: DFS

Concept: প্রতিটা প্যারেন্ট এর চাইল্ড কোন কোন কালার আছে তার হিসাব রাখবো, যেমন প্রথম উদাহরনে -
১ নং নোডের চাইল্ড এর সংখ্যা হবে ১টা লাল, ২টা নীল , ১টা নরমাল।
২ নং নোডের চাইল্ড এর সংখ্যা হবে ১টা লাল, ১টা নীল , ২টা নরমাল।
৩ নং এর ১টা নরমাল (নিজের কালার)।
৪ নং নোডের চাইল্ড এর সংখ্যা হবে ১টা লাল ( এইটা বাদ দিয়ে এন্সার পাব)।
৫ নং নোডের চাইল্ড এর সংখ্যা হবে 1টা নীল।

Solution 01:


Share:

C. Connect

C. Connect

Topic: BFS, Flood Fill, DFS


Share:

Bucket Sort

                  Bucket Sort

geeksforgeeks

hackerearth

visualization

Time Complexity: If we assume that insertion in a bucket takes O(1) time then steps 1 and 2 of the above algorithm clearly take O(n) time. The O(1) is easily possible if we use a linked list to represent a bucket (In the following code, C++ vector is used for simplicity). Step 4 also takes O(n) time as there will be n items in all buckets.
Share:

About

let's start CODE

Popular Posts