185 Topics

Member Avatar for
Member Avatar for while(!success)

Hey guys, I've been messing around trying to learn binary trees and have created a simple program to get the month and number of days in a month to be inserted into the tree then displayed. I am getting a successful build, however, when it launches the terminal window the …

Member Avatar for while(!success)
0
141
Member Avatar for Anonymous123

I have an assignment to write a program in Java to implement the Natural Correspondence Algorithm for converting a linear list into a binary tree. The program should process its inputs in two steps: (a) It first builds a tree for a given input list (b) It then traverses the …

Member Avatar for Anonymous123
0
276
Member Avatar for xtinab

Hello all, I'm having trouble writing a recursive algorithm to traverse a Huffman tree to encode a message. I'm sure you all know what they are. Here's my algorithm: string HuffmanCode(const char& symbol, const TreeNode<SymbolPriority>* huffman, string &code) { //Base case: you are in a leaf; if the leaf contains …

Member Avatar for histrungalot
0
1K
Member Avatar for Enjaz

Assalam Alaikum Could any one help pleeeeeeas This is a JAVA code written using Array data structure ! I have to convert it using a binary tree data structure ! I really face difficulty in doing that !!! I mean, I don't know where to start in the process :""(( …

Member Avatar for Enjaz
0
150
Member Avatar for TheWind147

Hi! I made a program that accepts random numbers, create a binary tree from it, then traverse it using in-order, pre-order and post-order traversal. The program is working well but my instructor added something else, when the user input numbers, it should be arranged just like an actual tree. The …

Member Avatar for TheWind147
0
4K
Member Avatar for group256

Hello everyone, I have to code an array that in each row, it has 16 columns! So I called it myself a 17 dimensional array but I was wondering what data sturcture in Python can best represent this keeping in mind that, it should be easily addressable and modifible. For …

Member Avatar for group256
0
176
Member Avatar for DanHu

Hi, I am trying to create a binary tree from a string read from a file. The string contains information that tells which is the new left and right nodes, and the node which new these nodes are to be added (assuming there is a root node in the tree …

Member Avatar for ztini
0
532
Member Avatar for dushtu.bor

Please tell me why it gives me always zero value? [CODE]<?php $total =0; $memid = $_POST['username']; $leg = $_POST['leg']; mysql_connect ("host", "usr", "paswd") or die ('Error: ' .mysql_error()); mysql_select_db ("dbname"); function getTotalLeg($memid,$leg){ $sql="select $leg from `users` where `username`='$memid' "; $res=mysql_query($sql); $row=mysql_fetch_array($res); global $total; $total = $total+mysql_num_rows($res); if($row['$leg']!=''){ getTotalLeg ($row['$leg'],'lname'); getTotalLeg …

Member Avatar for dushtu.bor
0
180
Member Avatar for ilovejava

This is my code for adding and removing from a binary tree but apparently its not complete can anyone tell me what to do to make it complete tree? [CODE] public void add(IBinaryTreeNode<E> e) { if (getRoot() == null) { setRoot(e); } else { //SAME HERE IBinaryTreeNode<E> node = getLastNode(); …

Member Avatar for ztini
0
249
Member Avatar for rizzi143

Create a program to construct a binary search tree consisting of nodes that each stores an integer in Java, avoid duplication of values when inserting nodes in the tree. When a new leaf node is created list all the nodes in the path from the newly added leaf node to …

Member Avatar for ejosiah
0
258
Member Avatar for zackh123

Hello, I am currently helping my BI team convert a Cognos Tree Object into a Javascript tree object. The part where I am stuck is using javascript to parse the XML data file that would normally fill up the Cognos tree. Here is an example of the XML data file... …

Member Avatar for Troy III
0
507
Member Avatar for karthik_ppts

Hi Frendz, How to create family tree chart using php/javascript/jquery? I googled that but :(. If any one know the link then help me..

Member Avatar for subrata_ushasi
0
3K
Member Avatar for n4j

Hello ,i have problem with code bellow. every data i enter it show me the weight '0'! Can you tell me how can i solve this problem? you should enter number of nods and edges and weight of each edge. [CODE] #include <stdio.h> #include <conio.h> #include <iostream> #include <Windows.h> using …

Member Avatar for n4j
0
256
Member Avatar for Rimojenkins

Hello. I am working on a data structures program that should be quite easy, but after programming in assembly language using mips, I forgot a little bit of C++ and can't remember how to do this. I've used my googlefu for at least 2 hours and still have this problem. …

Member Avatar for Rimojenkins
0
174
Member Avatar for GoodOldFashion

See I probably have the littlest knowledge on working with Linked Lists and I was thinking of creating a program that will accept three numbers which will be arranged on the list. However, I need to display the numbers everytime I input them, which I don't know how. My goal …

Member Avatar for GoodOldFashion
0
195
Member Avatar for needforkevin

hello all! i am working on a bank account type program where the user can add accounts delete accounts make deposits and so on. i have most of the code working but i am getting an error and i cant figure out whats wrong. if someone could steer me in …

Member Avatar for ravenous
0
170
Member Avatar for HardToHandle

Hello guys, So my task is the following: Draw a pine tree based on user inputted height. How tall should the tree be?: 6 /\ / \ / \ / \ / \ / \ ------------ || || || I had problems moving the cursor from the left to right …

Member Avatar for HardToHandle
0
516
Member Avatar for jatinkhandelwal

i would like to check a size of data structure of a file in another file . how can i do so using fopen????

Member Avatar for L7Sqr
0
104
Member Avatar for raheel_88

Hi everyone, I have been working with VB6 for about a week now, so I'm still a newbie. I have a pretty big project coming up and I have a question relating to the capabilities of VB6. I want a GUI that has a "Model" tree on the left, and …

Member Avatar for Jeff-Bennett
0
197
Member Avatar for omnia456

I have this example php string: [CODE]$string = "@[item_1][door] @[mozart][grass] = yes @[mozart][green] = no @[mozart][human] @[blue][movie]=yes @[item_1][beat] = yes @[item_1][music] = no ";[/CODE] now $string idented just to easy view: [CODE]@[item_1][door] @[mozart][grass] = yes @[mozart][green] = no @[mozart][human] @[blue][movie]=yes @[item_1][beat] = yes @[item_1][music] = no[/CODE] I want to know …

Member Avatar for pritaeas
0
270
Member Avatar for FiToKa

Hello, everybody! I've been struggling on implementing the Binary Tree data structure with some standard functions in it. After reading information from many sources and some work on my own, I've came up to this: [url]http://pastebin.com/B6Gtjb61[/url] Problems occur in the main funciton. What I can't understand is why does the …

Member Avatar for FiToKa
0
269
Member Avatar for veelasong

I am having trouble parsing xml files using ElementTree after the python code is turned into .exe using cx_freeze. [CODE] from xml.etree import ElementTree file1 = 'file1' file2 = 'file2' tree1 = ElementTree.parse(file1) tree2 = ElementTree.parse(file2) print 'Done' [/CODE] It works fine with the .py file, but after I made …

Member Avatar for veelasong
0
415
Member Avatar for cool_zephyr

Hello there..i'm trying to implement a tree in C#..the basic node structure is give below [code] struct node { public int _x; public int _y; public int _cost; public node _parent; public pos(int i, int j,int cost,pos parent) { _x = i; _y = j; _cost = cst; _parent = …

Member Avatar for cool_zephyr
0
156
Member Avatar for begueradj

Hello people I have a 2 dimension array that contains only 0 and 1 values. I want to represent all the 0 elements in a tree: how can I do that ? Thank you for any help

Member Avatar for begueradj
0
95
Member Avatar for Gribouillis

This snippet defines a function walk() which generically performs a depth-first traversal of a tree, using preorder, inorder or postorder rules. Here, genericity means here that there are no hypotheses on what the tree nodes are or the implementation of the tree. Walk() only needs an arbitrary object used as …

Member Avatar for Gribouillis
2
1K
Member Avatar for beeho

Hi all, I'm having a problem here!! I've attended a lecture on Implementation of stacks in c++ using arrays and it wasn't really hard to understand, but now I'm supposed to know how to Implement a stack using linked list, that's the problem. help please?:confused:

Member Avatar for beeho
0
279
Member Avatar for needforkevin

hello all! i am working on a program that reads in a text file that the user inputs, creates a text file that the user inputs, names the text file that the user wants, and then sorts the text file sorting words above the user entered in threshold and displays …

Member Avatar for needforkevin
0
332
Member Avatar for c++_fem

Hi, Does anyone know a function that prints out binary tree in this form example : ................15 .........12.............17 .......10 14.........16 18 ? my Node class : [CODE] class Node { double Node_Data; Node Left_Child; Node Right_Child; Node Parent; }[/CODE]

Member Avatar for Narue
0
351
Member Avatar for swissknife007

What are the settings I require so I can debug line -by line? Or else ,I can identify lines of code where run time errors are occuring.. I want to view exact line number of error in this code/[CODE]#include<stdio.h> #include<conio.h> #include<string.h> struct node {struct node * left,*right; int freq; char …

Member Avatar for gourav1
0
296
Member Avatar for alteran

I'm having a problem with adding the name, dob month, dob day, and dob year to a binary search tree from the information from the GUI. This has to happen after the "Add Person" button is clicked. I should add it inside the brackets of the "if(e.getSource() == addPersonButton)" statement, …

Member Avatar for JamesCherrill
0
191

The End.