E. Cyclic Components
resource
হিন্টঃ প্রতিটি কম্পোনেন্ট এ চেক করবো তাদের প্রত্যেকটি নোডের ডিগ্রি দুই কিনা, যদি দুই হয় তাইলে সেটা একটা সিঙ্গেল সাইকেল কম্পোনেন্ট।
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears...
Showing posts with label GeeksForGeeks. Show all posts
Showing posts with label GeeksForGeeks. Show all posts
Find n-th lexicographically permutation of a string
Find n-th lexicographically permutation of a string
Complexity: O(string length)
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.
...
Binomial Coefficient
Binomial Coefficient
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
...
Heap Sort
Heap Sort
Time Complexity: Time complexity of heapify is O(nLogn). Time complexity of createAndBuildHeap() is O(n) and overall time complexity of Heap Sort is O(nLogn).
hackerearth
GeeksForGeeks
visualization
...
Fractional Knapsack Problem
Fractional Knapsack Problem
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
...
Egyptian Fraction
Egyptian Fraction
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...
Closest Pair of Points
Resources:
cp-algorithms
Closest Pair of Points
Closest Pair of Points Problem
concept another explanation
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...
maximum XOR
Maximum XOR value of a pair from a range
//copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <bits/stdc++.h>
using namespace std;
#define INF 1<<30
#define MAX 10005
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
typedef...