What do you want to save?
Add Code snippet
New code examples
-
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 -
C++ 2022-01-24 03:50:27
how to compare the biggest node with the same level BST node c++
// C++ program to find largest // value on each level of binary tree. #include <bits/stdc++.h> using namespace std; /* A binary tree node has data, pointer to left child and a pointer to right child */ struct Node { int val; struct Node *left, *r... Add solution -
Javascript 2021-11-16 08:49:24
write a program to insert a node in bst in c
#include<stdlib.h> #include<stdio.h> struct bin_tree { int data; struct bin_tree * right, * left; }; typedef struct bin_tree node; void insert(node ** tree, int val) { node *temp = NULL; if(!(*tree)) { temp = (node *)mall... Add solution -
Other 2021-11-09 19:39:29
huffman coding algorithm code
// Huffman Coding in C++ #include <iostream> using namespace std; #define MAX_TREE_HT 50 struct MinHNode { unsigned freq; char item; struct MinHNode *left, *right; }; struct MinH { unsigned size; unsigned capacity; struct MinHNode **... Add solution -
Python 2021-11-08 16:38:07
convert c++ code to python online
// Program to print path from root node to destination node // for N*N -1 puzzle algorithm using Branch and Bound // The solution assumes that instance of puzzle is solvable #include <bits/stdc++.h> using namespace std; #define N 3 // state space t... Add solution -
Other 2021-10-29 10:28:11
How do you move through a Huffman tree? Select one: a. 0 = right 1= left b. 1 = left 2 = right c. 0 = left 1 = right d. 0 = middle 1 = back
// Huffman Coding in C++ #include <iostream> using namespace std; #define MAX_TREE_HT 50 struct MinHNode { unsigned freq; char item; struct MinHNode *left, *right; }; struct MinH { unsigned size; unsigned capacity; struct MinHNode **... Add solution -
C 2021-10-16 12:09:12
Segment tree
// 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