139 Topics

Member Avatar for
Member Avatar for brooklyn1991

Hello, everyone!:) I am new to Daniweb and I would like a little help in implementing Binomial Heap subroutines in C, especially insertion in Heap. For my application it is necessary to implement max-heaps(i.e., roots storing the maximum value) in stead of min-heaps(i.e., root storing minimum value) in ANSI C. …

Member Avatar for DGPickett
0
304
Member Avatar for chubbyy.putto

what I am trying to do is store same letter to same node. For example: let say I have person, people is sent to be put into a node. This will create two node. I want to some thing like P: Person People Person and People are same note When …

Member Avatar for bernardo.mclobo
0
412
Member Avatar for LibraryCode

Hi,i have a code like this in .h file: #pragma once #include "stdafx.h" #include"iostream" using namespace std; // balance factor enum enum BalanceFactor { LH, RH, EH }; // treenode struct template<class T> struct TreeNode { T info; TreeNode<T>* left; TreeNode<T>* right; BalanceFactor bf; }; template<typename ItemType> class TreeType { …

Member Avatar for LibraryCode
0
290
Member Avatar for kamibwp786

Salam i want to write a binary tree code with left and right child my question is that when one left side and one right side child complete then system credit 700 to parent id plz any body from this forum can help me? i am thankfull to you its …

Member Avatar for kamibwp786
0
726
Member Avatar for VengefulToast

Hi, I am trying to construct a binary tree using a list. class Element { private: list<Element*> _children; char* _name; //...other data members and methods } I have a class ("Element") that has children ("_children"), but I cannot figure out how to add children to the elements of "_children". I …

Member Avatar for David W
0
180
Member Avatar for BENTABET

I wrote a template class named "Tree<T>" in C++ which attributes are : - T data - std::vector<Tree*> sons; I wrote the basic methods consisting of writing and reading in those two attributes. Now, I'm writing methods that return the min and max depth. I have no compilation problems but …

Member Avatar for Duoas
0
293
Member Avatar for infiniteloop56

Hey Guys, I am building app using a huffman tree, and am building this java program to just test a few things and I am having some trouble. I have everything working except that I am having troble decompressing a huffman string back into the original string. I would appreciate …

Member Avatar for Taywin
0
968
Member Avatar for kxjakkk

I'm trying to modify this code: class Tree: def __init__(self, cargo, left=None, right=None): self.cargo = cargo self.left = left self.right = right def __str__(self): return str(self.cargo) def print_tree_inorder(tree): if tree is None: return print_tree_inorder(tree.left) print(tree.cargo, end=" ") print_tree_inorder(tree.right) So that it adds parentheses around every operator and pair of operands. …

Member Avatar for kxjakkk
0
461
Member Avatar for m1m6jbr

hello i have an attribute in 'users' table called RegNo which refer ro region number ... so i have to select users and display them according to their region number . here is my code <body> <ul id="nav"> <li class="heb"> <a href="parentUrl" >hebron</a> <li class="bet"> <a href="parentUrl" >ramallah</a> <?php include …

Member Avatar for m1m6jbr
0
268
Member Avatar for stephen.teacher

hi all, this is some extra credit from class we sat around cleaning up code today this is what we came up with public boolean equals2(IntTree t2){ return equals2(this.overallRoot, t2.overallRoot); } private Boolean equals2(IntTreeNode r1, IntTreeNode r2){ if(r1 == null || r2 == null){ return r1 == null && r2 …

Member Avatar for stephen.teacher
0
298
Member Avatar for samertaha

hi , i am searching for a good tree menu design for products categories to use it in my website , i need it to be flexible so i could style it as needed and also simple so i can target it with my own javascript. thanks again.

Member Avatar for samertaha
0
212
Member Avatar for hannahaddad

Hello. I'm developping a project about the decision tree in Java. My project idea is about animals, but it's gonna be a big database and i don't have too much time to complete. So my question is: Can anyone help me to found a complete database about animals or about …

Member Avatar for hannahaddad
0
190
Member Avatar for dancks

I wrote this test program to test the binary tree for a particular purpose. The intent is to make 2 new tree nodes with new data and destroy the data of the parent data, as its no longer needed (essentially its supposed to imitate "splitting" but my design calls for …

0
149
Member Avatar for nadiam

hey guys, so im creating a page using php html js etc and what i wanna do is have two tables on that page. the first table is populated by data from database(easy) the second table is tricky for me. in the second table i want to be able to …

0
150
Member Avatar for gu mi nam

this code was error.please help me fix it include <iostream> include <conio.h> include <algorithm> using namespace std; int a[]={1,5,7,4,9,8}; BST*binary_search_tree; struct BST{ int value; BST* left; BST* right; }; int search_bst(BST* node,int key){ if(node==NULL) return -1; if(key<node->value) return search_bst(node->left,key); if(key>node->value) return search_bst(node->right,key); else return node->value; } void insert_bst(BST* &treeNode,BST* newNode){ …

Member Avatar for gu mi nam
0
396
Member Avatar for dan.doca

so i got a class going for making and showing tree elements, i need some help with the following: i need to display the leaves and the height of the tree. here is the code: // ar.cpp #include <iostream> #include <stdlib.h> using namespace std; class nod { public: char inf; …

Member Avatar for dan.doca
0
367
Member Avatar for Krokcy

Hey! So I am having trouble with this [problem](projecteuler.net/problem=18)! Basically you have to find the path that gives the largest sum down this tree: 75 95 64 17 47 82 18 35 87 10 20 04 82 47 65 19 01 23 75 03 34 88 02 77 73 07 …

Member Avatar for Krokcy
1
286
Member Avatar for electrodelic

**hello peeps and geeks, i am missing the MinSpanningTree function here.. any help please? need to fill up the function to get a) Minimum spanning tree cost for the graph b)Spanning tree path for the graph. E.g in matrix or adjancency list. ** #include <iostream> #include <ctime> // For time() …

Member Avatar for Mouche
0
309
Member Avatar for muhammadnasiri

would any one give me idea or code about how to make a binary search tree of apple Ltd products prices. suppose products are: macbook i3, macbook i5, macbook i7, iphone 3g, iphone 3gs, iphone 4, iphone 4s, iphone 5, iphone 5s, iphone 5c, ipand 2, ipad mini.

0
130
Member Avatar for CheerfulBiscuit

Hey everyone, I really need help in solving a problem that I have to use recursion for. I have a list of paper objects. Each paper object has its own author(s) objects. Each author object knows which paper(s) objects they belong to. I have to build a scholarly neighborhood for …

Member Avatar for JamesCherrill
0
240
Member Avatar for dp121307

I have to write the an AVLTree in python, followed all the instructions and I feel I have it just right, only problem is I can't figure out how to display my tree. I have to use the test given below, as well as the 2 methods below in the …

0
190
Member Avatar for eldiablo1121

Hello, I'm trying to write a program that takes an input file name and lists the folders in a heirarchy ex.Folder subfolder etc I have most of my code, but I'm getting 2 errors that are connected and I have no idea how to fix it. Here is my code: …

Member Avatar for eldiablo1121
0
266
Member Avatar for sneha_

[CODE]//To convert postfix expression into an expression tree #include"stdio.h" #include"conio.h" #include"process.h" #include"string.h" #include"stdlib.h" struct node{ char item; struct node *lnode; struct node *rnode; }*stc[30],*temp,*root; typedef struct node *NODEPTR; char expression[50]; char c; int top=0; NODEPTR pop(); void push(NODEPTR); void getinput(); void inorder(NODEPTR p); int main (){ getinput(); int i,j; for(i=0;i<strlen(expression);i++) …

Member Avatar for deceptikon
0
2K
Member Avatar for pdwivedi

Hi all, I want to create all possible combinations of a full binary tree which must have exactly 4 leaf nodes and 3 internal nodes. I want to create it using recursion and tree must be simple binary tree not a binary search tree or BST. Kindly suggest algorithm to …

Member Avatar for pdwivedi
0
491
Member Avatar for Stju

Let's use the basic example.. I have a table for tree representation with just 3 columns: ID, PARENT_ID,NAME. If I delete a record X, how can I delete all recursive records that refer as PARENT_ID of deleted record?

Member Avatar for Rahul47
0
125
Member Avatar for best4earn

I have created my binary tree as , It Shows in List Perfectly but i want to show in Genealogy , how can we do this ..I have Pasted My Total Nodes Script Here with HTML & java script for making tables & draw lines btwn nodes . When I …

Member Avatar for best4earn
1
3K
Member Avatar for harde_1

Im trying to add Total function and isMono functions to this code. Did total already Need help with function ismono which returns whether a tree is mono (all the elements are unique aka no element appears more than one time) or not. Please this is the original program #ifndef T_H …

Member Avatar for deceptikon
0
306
Member Avatar for harde_1

Hi, I need a function that will take a tree as argument and return the number of ints that were typed and a correct call. would it just be preorder? like below. Please. Thanks #include "t.h" void preorder(tnode * t){ if (t == NULL) return; cout << t->info <<endl; preorder(t->left); …

Member Avatar for harde_1
0
439
Member Avatar for sciwizeh

Hello All, So I'm working on hand-coding a forum-like website, just for the experience, and I want to have a similar feature as you'll see above where a thread will have its ancestors linked: "Web Development > JSP > Parent traversal of tree-like Structure" I have several beans for different …

Member Avatar for sciwizeh
0
272
Member Avatar for Dorar

Hi This code not run : it show this error: incompatible types-found java.lang.String but expected HuffmanCodingAnimation.Node This line of code ` root.left.code = root.code + "0";` Here is the code: import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.tree.*; /* * This program enables a user to enter text and displays …

Member Avatar for JamesCherrill
1
635

The End.