Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 985 results for
balanced
- Page 1
Re: balanced paranthesis
Programming
Software Development
9 Years Ago
by bhavna123
Balanced
parenthesis means every opening parenthesis has its corresponding closing parenthesis. And the order is from inner to outer for closing. For example, if you have some parenthesis in this order {a*(b+C then closing parenthesis will be ) then } that is the expression will be: {a*(b+c)}
Balanced Tree
Programming
Software Development
14 Years Ago
by Gaiety
…3) 15 10 25 ( the above are
balanced
ok) 15 10 25 7 12 16 11…13 ( the program is printing the above is
balanced
) unable to rectify the probelm. int isbal(BST_t…
Re: balanced paranthesis
Programming
Software Development
9 Years Ago
by ITTechnos
…else break; } } if(Stk.empty()) cout << "
Balanced
Parenthesis" << endl; else cout << "…;Not
balanced
parenthesis" << endl; return 0; } Sample I…
Re: Balanced Tree
Programming
Software Development
14 Years Ago
by Tom Gunn
Your isbal() function only tests the root, it should recursively test every node because there are trees that can be unbalanced but still have a height difference of less than 2 from the root. The definition of height
balanced
is that when every node is tested as an individual tree, it will be
balanced
according to the height rule.
Balanced Parentheses using Recursion
Programming
Software Development
11 Years Ago
by hous3aholik
… of a boolean method to check if an expression has
balanced
parentheses using recursion. I cant figure out how to check… what i have so far. /** * Checks if the expression is
balanced
or not, making use of recursion. * @param in Expression to…
Re: balanced paranthesis
Programming
Software Development
9 Years Ago
by Gonbe
…[i]); if (par_is_balanced(EXAMPLE[i], strlen(EXAMPLE[i]))) printf("
balanced
.\n"); else printf("not
balanced
.\n"); } return 0; }
balanced k-way sort-merge
Programming
Software Development
19 Years Ago
by tat2dlady
Does anyone know basic pseudocode for a
balanced
k-way sort-merge? Thanks for any info you may have.
Re: balanced k-way sort-merge
Programming
Software Development
19 Years Ago
by marinme
[QUOTE=tat2dlady]Does anyone know basic pseudocode for a
balanced
k-way sort-merge? Thanks for any info you may have.[/QUOTE] I'm not sure what you mean by k-way, but if you define it a little better, we may be able to help :)
Re: balanced k-way sort-merge
Programming
Software Development
19 Years Ago
by Narue
… smaller streams and sorts each of them individually. By "
balanced
", it means that the value of k is consistent…
Re: balanced k-way sort-merge
Programming
Software Development
19 Years Ago
by tat2dlady
It is a 5-way
balanced
sort-merge. I have 10 temp files to work with (…
Balanced ternary numbers
Programming
Software Development
11 Years Ago
by TrustyTony
Here is my take on [
balanced
ternary](http://en.wikipedia.org/wiki/Balanced_ternary) conversion (the base considered by [Donald Knuth](http://en.wikipedia.org/wiki/Donald_Knuth) "Maybe the prettiest")
balanced paranthesis
Programming
Software Development
9 Years Ago
by Azhagu
in data structure, how the paranthesis
balanced
are checked with stack.little confusion in it.
not sure whether my balanced function for binary search tree is correct
Programming
Software Development
14 Years Ago
by lotrsimp12345
…is supposed to return tree if tree is
balanced
which means that left-right is 0 …> void my_bst<KT,DT>::
balanced
() { if(
balanced
(root)==1) { cout<<"… DT> bool my_bst<KT,DT>::
balanced
(my_bst_node<KT,DT>*& j) … } else { return false; } if(
balanced
(j->left)&&
balanced
(j->right)) { if(j->…
Algorithm: Check if string is balanced
Programming
Software Development
14 Years Ago
by gretty
…I have to do this: [QUOTE]Write a C++ function
balanced
that uses a [B]stack[/B] to check that all… brackets in a string are
balanced
. For eg: This is a balance string: [I]This (…string) has (
balanced
{brackets[(now)]} [thanks])[/I] This string is not
balanced
: [I]This [[string has (bad} …
Re: Algorithm: Check if string is balanced
Programming
Software Development
14 Years Ago
by VernonDozier
… of characters or are you just making sure everything's
balanced
? If the latter, there's not a lot to it… point, it's unbalanced. If all tests pass, it's
balanced
. [code] This [[string has (bad} brackets]>) [/code] Ignore all…'t match }. Test 2 fails. The string is therefore not
balanced
. [/LIST]
Re: not sure whether my balanced function for binary search tree is correct
Programming
Software Development
14 Years Ago
by lotrsimp12345
i mean when the left and right tree is
balanced
. So returns true.
Re: not sure whether my balanced function for binary search tree is correct
Programming
Software Development
14 Years Ago
by Murtan
… before the test. Based on the way you have written
balanced
() that would seem to be an inappropriate thing to be…
Re: Algorithm: Check if string is balanced
Programming
Software Development
14 Years Ago
by gretty
….empty() { if (open == close) { return true; } else return false; */ bool
balanced
(string s) { stack <char> letters; int open = 0…
Re: Function to determine if the binary search tree is perfectly balanced
Programming
Software Development
11 Years Ago
by deceptikon
… a complete tree? A full tree? Merely a height
balanced
or weight
balanced
tree? The algorithm is different for each. Typically what… each subtree and comparing them: is_balanced(tree)
balanced
= true height_diff = 0 if not empty(tree)
balanced
= is_balanced(tree.left) and is_balanced(tree…
Re: Function to determine if the binary search tree is perfectly balanced
Programming
Software Development
11 Years Ago
by yde
Using your definition of a perfectly
balanced
tree (I would call it an optimally packed tree), I … greater than 1, the tree is not
balanced
. If the tree is perfectly
balanced
you'll have to traverse the whole tree…
Stacks - balanced parentheses
Programming
Software Development
18 Years Ago
by gropedersen
… on creating a program that recognizes whether an expression has
balanced
parentheses or not. The program has to use ADT (Abstract… should then determine whether the parantheses in the expression are
balanced
. I have written a program, ... and it works and gives…
Java Balanced Search Tree HELP....
Programming
Software Development
11 Years Ago
by thechadv1
I need to develop a graphical representation of a
balanced
binary tree using random numbers from an array with the …; private JLabel cmdLabel; private JTextField cmdTextField; public AVLTreeDemo() { setTitle("
Balanced
Binary Tree"); JPanel resultPanel = new JPanel (new GridLayout(2…
Function to determine if the binary search tree is perfectly balanced
Programming
Software Development
11 Years Ago
by ariel930
Hello again.I recently have been doing a assignment which asks us to write a function to check whether a tree is perfectly
balanced
.I know the concept of Perfectly
balanced
tree but I just cant make out how to write this function.Any help in right direction will be highly welcome.
Re: Function to determine if the binary search tree is perfectly balanced
Programming
Software Development
11 Years Ago
by ariel930
Our question says the following definition: A tree is perfectly
balanced
if on each level there are 2 power n nodes except for last level.
Help with a 5-way balanced sort merge
Programming
Software Development
19 Years Ago
by tat2dlady
I am doing a 5-way
balanced
sort merge. I have 1, 000, 000 records and a …
Copying a sorted array to a balanced inorder Binary Search Tree
Programming
Software Development
15 Years Ago
by RingmasterTJ
… to copy the values of a passed array into a
Balanced
Binary Search Tree that will render a correct inorder traversal…
Re: Copying a sorted array to a balanced inorder Binary Search Tree
Programming
Software Development
15 Years Ago
by Murtan
… [/code] The z's are empty nodes. How much more
balanced
does that need to be?
A balanced tree
Programming
Databases
2 Years Ago
by ALI_418
A
balanced
tree is one of the data access techniques in a …
Re: determining whether a string of parentheses is balanced or not
Programming
Software Development
10 Years Ago
by neha.jebin.18
… } else outFile << "Parentheses are not
Balanced
" << endl; } } i++; } if…outFile << "Parentheses are
Balanced
" << endl; else outFile…
Re: determining whether a string of parentheses is balanced or not
Programming
Software Development
10 Years Ago
by David W
…lt; c << " parentheses are not
balanced
." << endl; } } else {… ) << " parentheses are not
balanced
with " << c <<…
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC