25 Topics

Member Avatar for
Member Avatar for daniel955

Hi I am a beginner in game programming and would like to make a rocketmania clone using opengl, the display and interaction part is done. I also have a classes named gameboard and tiles with their properties. but I am having problems on game logic, where the fuel flows into …

Member Avatar for Nisa_1
0
503
Member Avatar for Roger_2

I am having trouble implementing a solution using a binary search tree that returns the key of the node based on it's rank in O(N) worst case running time. Every idea i have (listed below) results in O(N^2) or sends me to a dead end. This almost seems impossible. i …

Member Avatar for AssertNull
0
1K
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 Amr87

Give that array I want to use the random string attached to the tab-title and tab content keys which are rEXMp and 3T2IV respectively , I want to use those to split the array into two arrays and getting rid of these characters in the new array and also add …

Member Avatar for Amr87
0
206
Member Avatar for Amr87

I have this array Array ( [0] => Array ( [post_category] => cat-1 ) [1] => Array ( [posts_count] => 33 ) [2] => Array ( [cells_num] => 1 ) [3] => Array ( [grid_num] => 0 ) [4] => Array ( [post_category] => cat-2 ) [5] => Array ( …

Member Avatar for Amr87
0
143
Member Avatar for ariel930

Hi.here is a question I got for assignment.I am stuck in this for hours and couldnt com up with any logic.Any help will be highly appreciated.Thanks Depth-First-Search Q.No.1 The undirected unweighted graph with one selected vertex is given. Find the number of vertices in the connected component where the selected …

Member Avatar for mridul.ahuja
0
168
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 tiffany.leroux.7

I am doing huffman coding and I have made the tree. Now I am required to traverse the tree to create bit strings associated with the characters. Then I will put the bit string and char into a map to use with encode/decode. I have been working on this for …

Member Avatar for owenransen
0
446
Member Avatar for rfrapp

I'm writing maze traversal for a school assignment, and I've got an issue. The X will move through most of the maze, but then it will get stuck at a position and keep cycling through. This is probably because I'm not checking properly to see if it hasn't been to …

Member Avatar for rfrapp
0
906
Member Avatar for utchia

Hi there i am trying to write a java code that will essentially be like a gps but a lot simplier and i need to make a mini map about 4 by 3. where Dunada and Government is the first intersection and i have already done so by using multiple …

Member Avatar for Taywin
0
133
Member Avatar for niyasc

Can anybody share the algorythm to perform inorder traversal of a binary search tree using parent node(without stack or recursion)

Member Avatar for deceptikon
0
159
Member Avatar for txhornsfan

I am having problems with my code. I think it is the print function, but I'm not sure. Everything compiles correctly. Just no output. Any help is appreciated. Thanks Here is what I have: #include <iostream> using namespace std; struct node* tree = NULL; struct node { int data; struct …

Member Avatar for Lucaci Andrew
0
214
Member Avatar for azareth

URGENT: guys i really need your help with this. I have been debugging my program for days but it doesn't seem to be improving this is the code for the table layout: <table border="1" id="COT_Table" onclick="getTableID(this)"> <td rowspan="3" scope="row">COT</td> <th colspan="4" scope="col">SFAL</th> </tr> <tr> <td colspan="2" scope="col">Temperature</td> <td rowspan="2" scope="row">vol …

0
127
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 Usoda

I have a Product class that is the parent of 3 other classes; Books, Movies, Music. And the Product class connects to the Store class that holds the Store's location. If I need to find a certain Product I have to traverse the list of each the Store class and …

Member Avatar for JamesCherrill
0
188
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
264
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 Rubinder singh

[CODE]void inorder(struct node *r) { if(r!=NULL) { inorder(r->left); printf("\t %d",r->data); inorder(r->right); } }[/CODE] in the above code when the last element is reached i.e r->left becomes null then when inorder(r->left) is called it will send a null value to the function and if condition becomes false so the it'll come …

Member Avatar for mikrosfoititis
1
165
Member Avatar for dolfan55aj

I'm a new member and this is my first post, so be gentle ;) It's been a while since I've gotten a chance to practice with recursion so to say I'm a bit rusty is an understatement. Not to mention I've never implemented it with a linked list. My current …

Member Avatar for mike_2000_17
0
521
Member Avatar for Iamthecheese

I'm having trouble formatting a binary tree. In my program, the tree format should print every output as such: 35 30 29 25 24 20 15 This is the code that I have thus far. [CODE]public void treeFormatTraversal(){//begin int level = 0; if(root !=null) treeFormatHelper(root, level); else System.out.println("\nTree is Empty\n"); …

Member Avatar for Iamthecheese
0
151
Member Avatar for jonpadre

I am currently attempting to write a single [B]recursive[/B] method (per instruction) whereas the items in a binary tree are displayed in a horizontal hierarchical manner (level order traversal). The UML describes the method as: levelOrderTraversal(TreeNode<T> tree, Integer indent) - tree: a node in the binary tree - indent: describes …

Member Avatar for jonpadre
0
197
Member Avatar for keicola

hi, i'm currently learning C on my own. i explicitly made a binary tree just to see if my postorder procedure works. i have no idea why but at the end of running the program, before it does the last procedure, this appears: [IMG]http://i56.tinypic.com/2nb52xx.jpg[/IMG] everything else works fine. i know …

Member Avatar for keicola
0
168
Member Avatar for Iamthecheese

Hello, I'm getting quite flustered with this program and the errors are starting to get harder to debug. This is my tree.java file: [CODE]package TreePkg; import java.io.FileNotFoundException; import java.lang.SecurityException; import java.util.Scanner; import java.util.NoSuchElementException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.Serializable; import java.io.EOFException; class TreeNode<T extends Comparable <T>> …

Member Avatar for JamesCherrill
0
228
Member Avatar for lasl0w

Hello, I'm doing a full traversal of a binary search tree structure looking for a node by a field that is not the sort key. If the node i'm looking for is the root node, no problem. If it's any other node then the function has a Seg Fault. Anyone …

Member Avatar for lasl0w
0
197
Member Avatar for xxunknown321

My teacher wrote this code. i am having trouble understanding what is going on in the code. can someone please help me by commenting in the program if you can tell me the importance of the functions and how everything works. please help me.... i'm a noob programmer #include <iostream> …

Member Avatar for Lerner
0
199

The End.