Anower Hossainanower77.hashnode.dev·Jul 14, 2024Segment Tree-1Segment Tree Basic Node Divide With Segment Tree Node Numbering (Segment Tree) // build (node, begin, end) build (1, 1, N) { L = 2xN, R = (2xN) + 1 // Node Number Calculate mid = (begin + end) / 2 left = (L, begin, mid) left = (R, ...Discuss·149 readssegment-tree
Anower Hossainanower77.hashnode.dev·Jul 7, 2024Recursion & Backtracking1-Recursion-Basic #include "bits/stdc++.h" using namespace std; void solve(int n) { if(n==0) return; solve(n-1); cout<< n << " "; } int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n; cin>>n; solve(n); ...Discuss2-Tree-Recursion