Hi guys.. I want to build a Binary Tree (Not Binary Search Tree) which is complete using Linked List.. Any ideas? I have a search function implemented below which returns you a TreeNode pointer if it...
Type: Posts; User: 7heavens
Hi guys.. I want to build a Binary Tree (Not Binary Search Tree) which is complete using Linked List.. Any ideas? I have a search function implemented below which returns you a TreeNode pointer if it...
Hi guys.
Can anyone give me a rough idea of how to remove duplicate items from a vector?
I finally figured it out! =) I wanted to do it without sorting.. I hope this time I'm correct. I spent quite a lot of time on this!! Tried the test cases Mike posted and other test cases.. If there's...
Haha.. Yeah. Was about to post about that. What can I do to the code to make it work? I don't want to sort.. :)
Thank you for the prompt responses laserlight. What I meant by both array contain the same elements is that the size of both the array is the same and they contain the same elemenets but not...
Is there a way to do it without sorting the arrays?
Maybe I used the wrong term. I want to check whether both array contain the same elements.
Hi guys. I am having trouble with checking equality of 2 Arrays which have integers.. At first it sounded easy, but for some unknown reason, I'm finding it hard to code. I don't want to sort out the...
I just wanted to clarify about Character pointers and Arrays. Sorry for asking so much in one post but they are very short questions.. Thank you!
int main()
{
char *p="FIVE";
char...
Think you misunderstood my question. Haha.. I wanted to know whether there is another of saying the following. Another code which does the same thing as the constructor below in other words. Is there...
Ah Icic! Got another burning question. When I use this constructor, it works.
Shape(char *p,int x,int y) : Point(x,y)
{
colour=p;
}
But when I use the following...
Oh! Just tried that. Thanks cyberfish =) I changed the line "*colour=*p;" to "colour=p;". But I am not very sure why the former doesn't work and the latter works. can you explain pls
Thanks for the prompt reply. I ran into another problem. I'm using inheritance now.
#include <iostream>
#include <string>
using namespace std;
class Point
{
#include <iostream>
#include <string>
using namespace std;
class Point
{
private:
int _x,_y;
I need to write a function using recursive backtracking. Give a number of characters stored in an array, the function finds for braces. For example, for CH3(CH[OH])4H, once I find this brace '(' , I...
Another small question.. what does the following statement mean? invalid and val are variables..
Thanks..
invalid = invalid?1:val?1:0;
Thanks adak and core_cpp! Changing the if(invalid=0) to if(invalid==0) solved the problem. I am creating the status.txt first and then reading it..
yours is much neater cosmic_cow.. I've another problem.
I need the x coordinate to be between 0 and 19, and the
y coordinate to be between 10 and 19.[As stated in the condition]
I tried...
I'm doing C programming.. Can I get some ideas on how to solve this question? I have totally no idea. I'm a beginner so would prefer a really simple approach (if it exist).. haha
When writing...
thanks for the detailed reply man.. I got it. My condition was wrong..
Hi.. I am doing C programming on microsoft Visual C++. I want to prompt the user for coordinate again and again if the input coordinate doesn't meet the condition. But after I type in the coordinate,...
my teacher want me to use the for loops.. haha Because we are just starting out on C programming. we haven't learnt skipping unwanted fields, he allows us only to use the stuff we learnt.. pls help!
Hi ppl. Beginner here..
I have a set of data
1 2 3 4 5 6 7 8 9
9 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 9
how do i use a fscanf statement to read the third number in the second row(which is 7 as...