What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2022-03-17 01:50:02
python tree library
# pypi, the Python Package Index, suggests tinytree, treedict, caxes, # treelib, pyavl... these are just the top few after filtering away the # many accidental hits (which point to specific tree such as XML ones, # AST ones, etc, etc;-)... Add solution -
Other 2022-03-16 19:40:15
vertical traversal of binary tree gfg
void getVerticalOrder(TreeNode* root, int hd, map<int, vector<int>> &mp) { // Base case if (root == NULL) return; mp[hd].push_back(root->val); getVerticalOrder(root->left, hd-1, mp); getVerticalOrder... Add solution -
Other 2022-03-16 18:10:16
pure component
The major difference between React.PureComponent and React.Component is PureComponent does a shallow comparison on state change. It means that when comparing scalar values it compares their values, but when comparing objects it compares only references. I... Add solution -
Java 2022-03-16 16:15:12
sort treeset in descending order using comparator
//To sort a treeset in descending order just use the descendingSet() method import java.util.TreeSet; public class Main { public static void main(String[] args) { TreeSet<Object> treeSet = new TreeSet<Object>(... Add solution -
C++ 2022-03-15 06:55:06
segment tree complexity
// C++ program to show segment tree operations like construction, query // and update #include <bits/stdc++.h> using namespace std; // A utility function to get the middle index from corner indexes. int getMid(int s, int e) { return s + (e -s)... Add solution