eden gilad

Greenhorn
+ Follow
since Oct 10, 2020
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by eden gilad


3 years ago
the complexity is o(1)?
3 years ago
The vertex of a binary tree is called an single child if it has a father's vertex but does not have a neighbor.

The root is not considered an single child.

let mark in  numOnly  a number of vertices in T that hold the attribute "single son ", and ‘with n we mark the total number of vertices in the T tree.
Is it true that every binary tree called "T" if numOnly/n<=0.5
then the height of "T" maintains the condition: height(T)=O(logn)?
3 years ago
i mean in pseudo code
3 years ago
how do i merge two minimum-heaps to one heap in efficiency?
public static MinHeap mergeTwoHeaps(MinHeap h1, MinHeap h2){….}
3 years ago
how do i merge two minimum-heaps to one heap in efficiency?
public static MinHeap mergeTwoHeaps(MinHeap h1, MinHeap h2){….}
3 years ago
finding the maximum elememt in min heap when all the elements are different
3 years ago

Where can  min heap be a maximum elememt, when all the elements are different?
3 years ago
i think also they mean the maximum number of  nodes from the root to ANY of the leaves.
3 years ago
T is a binary tree with "n" vertices. "maxSum" is the maximum amount of The keys in the path from the root to the leaf. Write a recursive static function that takes a binary tree and returns the largest set of keys. I dont know how to continue this code :
class Node{
String data;
Node left, right;
boolean val;
Node(String data){
this.data = data;
this.left = null;
this.right = null;
val = false; //help field
}
public String toString(){return ""+data;}
public String getData() {return data;}
public Node getLeft() {return left;}
public Node getRight() {return right;}
}// Node
public class BinaryTree {
private Node root;
public BinaryTree() {this.root = null;}
public static Integer maxSum(BinaryTree tree) {. . .}
3 years ago