AVL Tree in C with iterative insertion2019 Community Moderator ElectionIs it a good idea to typedef pointers?The best way to calculate the height in a binary search tree? (balancing an AVL-tree)Improve INSERT-per-second performance of SQLite?How to check if my AVL tree implementation is correct?python AVL tree insertionDeletion in AVL TreeBalancing an AVL tree C++C: Creating a AVL balanced TreeInsertion function into AVL tree won't insertroot node does not rebalance avl treeBalance procedure of AVL Tree

Do I need an EFI partition for each 18.04 ubuntu I have on my HD?

Recursively updating the MLE as new observations stream in

Why is this tree refusing to shed its dead leaves?

Did Nintendo change its mind about 68000 SNES?

Can "few" be used as a subject? If so, what is the rule?

Animating wave motion in water

Why didn’t Eve recognize the little cockroach as a living organism?

Why do I have a large white artefact on the rendered image?

How are passwords stolen from companies if they only store hashes?

How can an organ that provides biological immortality be unable to regenerate?

Error in master's thesis, I do not know what to do

How do researchers send unsolicited emails asking for feedback on their works?

Jem'Hadar, something strange about their life expectancy

10 year ban after applying for a UK student visa

Have any astronauts/cosmonauts died in space?

What kind of footwear is suitable for walking in micro gravity environment?

Interior of Set Notation

CLI: Get information Ubuntu releases

Exit shell with shortcut (not typing exit) that closes session properly

is this saw blade faulty?

Is VPN a layer 3 concept?

Why are there no stars visible in cislunar space?

Pre-Employment Background Check With Consent For Future Checks

Do people actually use the word "kaputt" in conversation?



AVL Tree in C with iterative insertion



2019 Community Moderator ElectionIs it a good idea to typedef pointers?The best way to calculate the height in a binary search tree? (balancing an AVL-tree)Improve INSERT-per-second performance of SQLite?How to check if my AVL tree implementation is correct?python AVL tree insertionDeletion in AVL TreeBalancing an AVL tree C++C: Creating a AVL balanced TreeInsertion function into AVL tree won't insertroot node does not rebalance avl treeBalance procedure of AVL Tree










0















I'm coding a generic AVL tree as both a challenge to myself and, if I can do it properly, a resource for other CS students out there.



As one usually would, I started by implementing a recursive insertion function, which works. However, due to efficiency, I tried to implement the same function, but iteratively. I searched online and found lots of implementations, but the rest of the code was always too different from mine, which led me to continue attempting to create an implementation from scratch.



These are the relevant defined types:



typedef struct info 
int id;
char name[200];
data;

typedef struct avl_node
void * data;
struct avl_node * left;
struct avl_node * right;
int height;
* avl_node_t;

typedef struct avl_tree
avl_node_t root;
int num_nodes;
int (*less)(const void * first, const void * second);
int (*key)(const void * data);
* avl_t;


And as follows is the iterative insertion function (which doesn't work as intended):



avl_node_t
avl_insert(avl_node_t node, void * data)

long key1 = 0, key2 = 0;
avl_node_t aux = NULL;

while (1)
if (node == NULL)
node = avl_node_create(data);
break;


key1 = key((void*)&data);
key2 = key((void*)&(node->data));

aux = node;

if (less((void*)&key1, (void*)&key2))
node = node->left;
else
node = node->right;


if (aux != NULL)
if (less((void*)&key1, (void*)&key2))
aux->right = node;
else if (less((void*)&key2, (void*)&key1))
aux->left = node;


node = avl_balance(node);

return node;



In which the avl_balance function is defined as such:



static short
balance(avl_node_t node)

if (node == NULL)
return 0;

return avl_node_height(node->left) - avl_node_height(node->right);

static avl_node_t
avl_balance(avl_node_t node)

short balance_factor;

if (node == NULL)
return node;

balance_factor = balance(node);

if (balance_factor > 1)
if (balance(node->left) >= 0)
node = avl_rotRight(node);
else
node = avl_rotLeftRight(node);
else if (balance_factor < -1)
if (balance(node->right) <= 0)
node = avl_rotLeft(node);
else
node = avl_rotRightLeft(node);
else
update_height(node);

return node;



This is the code I'm using to test the AVL tree:



int main()

data d1 = 1, "we are number one" ;
data d2 = 2, "boneless pizza" ;
data d3 = 3, "hehe" ;
data d4 = 4, "achoo" ;
data d5 = 5, "I like C" ;
data d6 = 6, "Assembly is cool too" ;
data d7 = 7, "SIGSEGV" ;

avl_t tree = avl_create();

avl_node_t root = tree->root;

root = avl_insert(root, (void*)&d1);
traverse(root);
root = avl_insert(root, (void*)&d2);
traverse(root);
root = avl_insert(root, (void*)&d3);
root = avl_insert(root, (void*)&d4);
root = avl_insert(root, (void*)&d5);
root = avl_insert(root, (void*)&d6);
root = avl_insert(root, (void*)&d7);
traverse(root);

free(tree);

exit(0);



In which traverse is defined as such:



void visit(void * d)

data * my_data = (data*)d;
printf("I am element number %d named %sn", (*my_data).id, (*my_data).name);
fflush(stdout);

void traverse(avl_node_t node)

if (node == NULL)
return;

traverse(node->left);
traverse(node->right);
visit(node->data);



And finally, this is the output I'm getting from this test:



I am element number 1 named we are number one
I am element number 2 named boneless pizza
I am element number 7 named SIGSEGV


Thank you in advance.










share|improve this question



















  • 2





    Note what it says in Is it a good idea to typedef pointers — TL;DR, the answer is generally "No".

    – Jonathan Leffler
    Mar 6 at 21:21






  • 1





    You're not using the less or key members while inserting the data; and you don't pass pointers to initialize them to the create function. Inside the insert() function, you are doing some funky stuff with key1 and key2, completely subverting the generic code framework you have, and you call less and key directly — they aren't the function pointer members of the structure. (This is not C++!)

    – Jonathan Leffler
    Mar 6 at 21:26







  • 1





    You don't show traverse() or avl_balance(), so this isn't an MCVE (Minimal, Complete, and Verifiable example). And your free(tree) is bound to leak a lot of allocated memory if you've inserted any data into the tree. You might well need a function pointer to free the data, too. Or maybe you need an apply() function a bit like traverse() that can be called to free the data in each node.

    – Jonathan Leffler
    Mar 6 at 21:28






  • 1





    Of the various examples, the Efficient AVL tree - rosettacode.com has a decent iterative insert.

    – David C. Rankin
    Mar 6 at 22:01






  • 1





    Please note that we don't have copies of your working functions, so it is hard for us to know how they work. MCVE expands to include Complete — which means "can be run".

    – Jonathan Leffler
    Mar 10 at 1:45















0















I'm coding a generic AVL tree as both a challenge to myself and, if I can do it properly, a resource for other CS students out there.



As one usually would, I started by implementing a recursive insertion function, which works. However, due to efficiency, I tried to implement the same function, but iteratively. I searched online and found lots of implementations, but the rest of the code was always too different from mine, which led me to continue attempting to create an implementation from scratch.



These are the relevant defined types:



typedef struct info 
int id;
char name[200];
data;

typedef struct avl_node
void * data;
struct avl_node * left;
struct avl_node * right;
int height;
* avl_node_t;

typedef struct avl_tree
avl_node_t root;
int num_nodes;
int (*less)(const void * first, const void * second);
int (*key)(const void * data);
* avl_t;


And as follows is the iterative insertion function (which doesn't work as intended):



avl_node_t
avl_insert(avl_node_t node, void * data)

long key1 = 0, key2 = 0;
avl_node_t aux = NULL;

while (1)
if (node == NULL)
node = avl_node_create(data);
break;


key1 = key((void*)&data);
key2 = key((void*)&(node->data));

aux = node;

if (less((void*)&key1, (void*)&key2))
node = node->left;
else
node = node->right;


if (aux != NULL)
if (less((void*)&key1, (void*)&key2))
aux->right = node;
else if (less((void*)&key2, (void*)&key1))
aux->left = node;


node = avl_balance(node);

return node;



In which the avl_balance function is defined as such:



static short
balance(avl_node_t node)

if (node == NULL)
return 0;

return avl_node_height(node->left) - avl_node_height(node->right);

static avl_node_t
avl_balance(avl_node_t node)

short balance_factor;

if (node == NULL)
return node;

balance_factor = balance(node);

if (balance_factor > 1)
if (balance(node->left) >= 0)
node = avl_rotRight(node);
else
node = avl_rotLeftRight(node);
else if (balance_factor < -1)
if (balance(node->right) <= 0)
node = avl_rotLeft(node);
else
node = avl_rotRightLeft(node);
else
update_height(node);

return node;



This is the code I'm using to test the AVL tree:



int main()

data d1 = 1, "we are number one" ;
data d2 = 2, "boneless pizza" ;
data d3 = 3, "hehe" ;
data d4 = 4, "achoo" ;
data d5 = 5, "I like C" ;
data d6 = 6, "Assembly is cool too" ;
data d7 = 7, "SIGSEGV" ;

avl_t tree = avl_create();

avl_node_t root = tree->root;

root = avl_insert(root, (void*)&d1);
traverse(root);
root = avl_insert(root, (void*)&d2);
traverse(root);
root = avl_insert(root, (void*)&d3);
root = avl_insert(root, (void*)&d4);
root = avl_insert(root, (void*)&d5);
root = avl_insert(root, (void*)&d6);
root = avl_insert(root, (void*)&d7);
traverse(root);

free(tree);

exit(0);



In which traverse is defined as such:



void visit(void * d)

data * my_data = (data*)d;
printf("I am element number %d named %sn", (*my_data).id, (*my_data).name);
fflush(stdout);

void traverse(avl_node_t node)

if (node == NULL)
return;

traverse(node->left);
traverse(node->right);
visit(node->data);



And finally, this is the output I'm getting from this test:



I am element number 1 named we are number one
I am element number 2 named boneless pizza
I am element number 7 named SIGSEGV


Thank you in advance.










share|improve this question



















  • 2





    Note what it says in Is it a good idea to typedef pointers — TL;DR, the answer is generally "No".

    – Jonathan Leffler
    Mar 6 at 21:21






  • 1





    You're not using the less or key members while inserting the data; and you don't pass pointers to initialize them to the create function. Inside the insert() function, you are doing some funky stuff with key1 and key2, completely subverting the generic code framework you have, and you call less and key directly — they aren't the function pointer members of the structure. (This is not C++!)

    – Jonathan Leffler
    Mar 6 at 21:26







  • 1





    You don't show traverse() or avl_balance(), so this isn't an MCVE (Minimal, Complete, and Verifiable example). And your free(tree) is bound to leak a lot of allocated memory if you've inserted any data into the tree. You might well need a function pointer to free the data, too. Or maybe you need an apply() function a bit like traverse() that can be called to free the data in each node.

    – Jonathan Leffler
    Mar 6 at 21:28






  • 1





    Of the various examples, the Efficient AVL tree - rosettacode.com has a decent iterative insert.

    – David C. Rankin
    Mar 6 at 22:01






  • 1





    Please note that we don't have copies of your working functions, so it is hard for us to know how they work. MCVE expands to include Complete — which means "can be run".

    – Jonathan Leffler
    Mar 10 at 1:45













0












0








0








I'm coding a generic AVL tree as both a challenge to myself and, if I can do it properly, a resource for other CS students out there.



As one usually would, I started by implementing a recursive insertion function, which works. However, due to efficiency, I tried to implement the same function, but iteratively. I searched online and found lots of implementations, but the rest of the code was always too different from mine, which led me to continue attempting to create an implementation from scratch.



These are the relevant defined types:



typedef struct info 
int id;
char name[200];
data;

typedef struct avl_node
void * data;
struct avl_node * left;
struct avl_node * right;
int height;
* avl_node_t;

typedef struct avl_tree
avl_node_t root;
int num_nodes;
int (*less)(const void * first, const void * second);
int (*key)(const void * data);
* avl_t;


And as follows is the iterative insertion function (which doesn't work as intended):



avl_node_t
avl_insert(avl_node_t node, void * data)

long key1 = 0, key2 = 0;
avl_node_t aux = NULL;

while (1)
if (node == NULL)
node = avl_node_create(data);
break;


key1 = key((void*)&data);
key2 = key((void*)&(node->data));

aux = node;

if (less((void*)&key1, (void*)&key2))
node = node->left;
else
node = node->right;


if (aux != NULL)
if (less((void*)&key1, (void*)&key2))
aux->right = node;
else if (less((void*)&key2, (void*)&key1))
aux->left = node;


node = avl_balance(node);

return node;



In which the avl_balance function is defined as such:



static short
balance(avl_node_t node)

if (node == NULL)
return 0;

return avl_node_height(node->left) - avl_node_height(node->right);

static avl_node_t
avl_balance(avl_node_t node)

short balance_factor;

if (node == NULL)
return node;

balance_factor = balance(node);

if (balance_factor > 1)
if (balance(node->left) >= 0)
node = avl_rotRight(node);
else
node = avl_rotLeftRight(node);
else if (balance_factor < -1)
if (balance(node->right) <= 0)
node = avl_rotLeft(node);
else
node = avl_rotRightLeft(node);
else
update_height(node);

return node;



This is the code I'm using to test the AVL tree:



int main()

data d1 = 1, "we are number one" ;
data d2 = 2, "boneless pizza" ;
data d3 = 3, "hehe" ;
data d4 = 4, "achoo" ;
data d5 = 5, "I like C" ;
data d6 = 6, "Assembly is cool too" ;
data d7 = 7, "SIGSEGV" ;

avl_t tree = avl_create();

avl_node_t root = tree->root;

root = avl_insert(root, (void*)&d1);
traverse(root);
root = avl_insert(root, (void*)&d2);
traverse(root);
root = avl_insert(root, (void*)&d3);
root = avl_insert(root, (void*)&d4);
root = avl_insert(root, (void*)&d5);
root = avl_insert(root, (void*)&d6);
root = avl_insert(root, (void*)&d7);
traverse(root);

free(tree);

exit(0);



In which traverse is defined as such:



void visit(void * d)

data * my_data = (data*)d;
printf("I am element number %d named %sn", (*my_data).id, (*my_data).name);
fflush(stdout);

void traverse(avl_node_t node)

if (node == NULL)
return;

traverse(node->left);
traverse(node->right);
visit(node->data);



And finally, this is the output I'm getting from this test:



I am element number 1 named we are number one
I am element number 2 named boneless pizza
I am element number 7 named SIGSEGV


Thank you in advance.










share|improve this question
















I'm coding a generic AVL tree as both a challenge to myself and, if I can do it properly, a resource for other CS students out there.



As one usually would, I started by implementing a recursive insertion function, which works. However, due to efficiency, I tried to implement the same function, but iteratively. I searched online and found lots of implementations, but the rest of the code was always too different from mine, which led me to continue attempting to create an implementation from scratch.



These are the relevant defined types:



typedef struct info 
int id;
char name[200];
data;

typedef struct avl_node
void * data;
struct avl_node * left;
struct avl_node * right;
int height;
* avl_node_t;

typedef struct avl_tree
avl_node_t root;
int num_nodes;
int (*less)(const void * first, const void * second);
int (*key)(const void * data);
* avl_t;


And as follows is the iterative insertion function (which doesn't work as intended):



avl_node_t
avl_insert(avl_node_t node, void * data)

long key1 = 0, key2 = 0;
avl_node_t aux = NULL;

while (1)
if (node == NULL)
node = avl_node_create(data);
break;


key1 = key((void*)&data);
key2 = key((void*)&(node->data));

aux = node;

if (less((void*)&key1, (void*)&key2))
node = node->left;
else
node = node->right;


if (aux != NULL)
if (less((void*)&key1, (void*)&key2))
aux->right = node;
else if (less((void*)&key2, (void*)&key1))
aux->left = node;


node = avl_balance(node);

return node;



In which the avl_balance function is defined as such:



static short
balance(avl_node_t node)

if (node == NULL)
return 0;

return avl_node_height(node->left) - avl_node_height(node->right);

static avl_node_t
avl_balance(avl_node_t node)

short balance_factor;

if (node == NULL)
return node;

balance_factor = balance(node);

if (balance_factor > 1)
if (balance(node->left) >= 0)
node = avl_rotRight(node);
else
node = avl_rotLeftRight(node);
else if (balance_factor < -1)
if (balance(node->right) <= 0)
node = avl_rotLeft(node);
else
node = avl_rotRightLeft(node);
else
update_height(node);

return node;



This is the code I'm using to test the AVL tree:



int main()

data d1 = 1, "we are number one" ;
data d2 = 2, "boneless pizza" ;
data d3 = 3, "hehe" ;
data d4 = 4, "achoo" ;
data d5 = 5, "I like C" ;
data d6 = 6, "Assembly is cool too" ;
data d7 = 7, "SIGSEGV" ;

avl_t tree = avl_create();

avl_node_t root = tree->root;

root = avl_insert(root, (void*)&d1);
traverse(root);
root = avl_insert(root, (void*)&d2);
traverse(root);
root = avl_insert(root, (void*)&d3);
root = avl_insert(root, (void*)&d4);
root = avl_insert(root, (void*)&d5);
root = avl_insert(root, (void*)&d6);
root = avl_insert(root, (void*)&d7);
traverse(root);

free(tree);

exit(0);



In which traverse is defined as such:



void visit(void * d)

data * my_data = (data*)d;
printf("I am element number %d named %sn", (*my_data).id, (*my_data).name);
fflush(stdout);

void traverse(avl_node_t node)

if (node == NULL)
return;

traverse(node->left);
traverse(node->right);
visit(node->data);



And finally, this is the output I'm getting from this test:



I am element number 1 named we are number one
I am element number 2 named boneless pizza
I am element number 7 named SIGSEGV


Thank you in advance.







c data-structures avl-tree






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 6 at 23:16







Saucy Goat

















asked Mar 6 at 21:12









Saucy GoatSaucy Goat

847




847







  • 2





    Note what it says in Is it a good idea to typedef pointers — TL;DR, the answer is generally "No".

    – Jonathan Leffler
    Mar 6 at 21:21






  • 1





    You're not using the less or key members while inserting the data; and you don't pass pointers to initialize them to the create function. Inside the insert() function, you are doing some funky stuff with key1 and key2, completely subverting the generic code framework you have, and you call less and key directly — they aren't the function pointer members of the structure. (This is not C++!)

    – Jonathan Leffler
    Mar 6 at 21:26







  • 1





    You don't show traverse() or avl_balance(), so this isn't an MCVE (Minimal, Complete, and Verifiable example). And your free(tree) is bound to leak a lot of allocated memory if you've inserted any data into the tree. You might well need a function pointer to free the data, too. Or maybe you need an apply() function a bit like traverse() that can be called to free the data in each node.

    – Jonathan Leffler
    Mar 6 at 21:28






  • 1





    Of the various examples, the Efficient AVL tree - rosettacode.com has a decent iterative insert.

    – David C. Rankin
    Mar 6 at 22:01






  • 1





    Please note that we don't have copies of your working functions, so it is hard for us to know how they work. MCVE expands to include Complete — which means "can be run".

    – Jonathan Leffler
    Mar 10 at 1:45












  • 2





    Note what it says in Is it a good idea to typedef pointers — TL;DR, the answer is generally "No".

    – Jonathan Leffler
    Mar 6 at 21:21






  • 1





    You're not using the less or key members while inserting the data; and you don't pass pointers to initialize them to the create function. Inside the insert() function, you are doing some funky stuff with key1 and key2, completely subverting the generic code framework you have, and you call less and key directly — they aren't the function pointer members of the structure. (This is not C++!)

    – Jonathan Leffler
    Mar 6 at 21:26







  • 1





    You don't show traverse() or avl_balance(), so this isn't an MCVE (Minimal, Complete, and Verifiable example). And your free(tree) is bound to leak a lot of allocated memory if you've inserted any data into the tree. You might well need a function pointer to free the data, too. Or maybe you need an apply() function a bit like traverse() that can be called to free the data in each node.

    – Jonathan Leffler
    Mar 6 at 21:28






  • 1





    Of the various examples, the Efficient AVL tree - rosettacode.com has a decent iterative insert.

    – David C. Rankin
    Mar 6 at 22:01






  • 1





    Please note that we don't have copies of your working functions, so it is hard for us to know how they work. MCVE expands to include Complete — which means "can be run".

    – Jonathan Leffler
    Mar 10 at 1:45







2




2





Note what it says in Is it a good idea to typedef pointers — TL;DR, the answer is generally "No".

– Jonathan Leffler
Mar 6 at 21:21





Note what it says in Is it a good idea to typedef pointers — TL;DR, the answer is generally "No".

– Jonathan Leffler
Mar 6 at 21:21




1




1





You're not using the less or key members while inserting the data; and you don't pass pointers to initialize them to the create function. Inside the insert() function, you are doing some funky stuff with key1 and key2, completely subverting the generic code framework you have, and you call less and key directly — they aren't the function pointer members of the structure. (This is not C++!)

– Jonathan Leffler
Mar 6 at 21:26






You're not using the less or key members while inserting the data; and you don't pass pointers to initialize them to the create function. Inside the insert() function, you are doing some funky stuff with key1 and key2, completely subverting the generic code framework you have, and you call less and key directly — they aren't the function pointer members of the structure. (This is not C++!)

– Jonathan Leffler
Mar 6 at 21:26





1




1





You don't show traverse() or avl_balance(), so this isn't an MCVE (Minimal, Complete, and Verifiable example). And your free(tree) is bound to leak a lot of allocated memory if you've inserted any data into the tree. You might well need a function pointer to free the data, too. Or maybe you need an apply() function a bit like traverse() that can be called to free the data in each node.

– Jonathan Leffler
Mar 6 at 21:28





You don't show traverse() or avl_balance(), so this isn't an MCVE (Minimal, Complete, and Verifiable example). And your free(tree) is bound to leak a lot of allocated memory if you've inserted any data into the tree. You might well need a function pointer to free the data, too. Or maybe you need an apply() function a bit like traverse() that can be called to free the data in each node.

– Jonathan Leffler
Mar 6 at 21:28




1




1





Of the various examples, the Efficient AVL tree - rosettacode.com has a decent iterative insert.

– David C. Rankin
Mar 6 at 22:01





Of the various examples, the Efficient AVL tree - rosettacode.com has a decent iterative insert.

– David C. Rankin
Mar 6 at 22:01




1




1





Please note that we don't have copies of your working functions, so it is hard for us to know how they work. MCVE expands to include Complete — which means "can be run".

– Jonathan Leffler
Mar 10 at 1:45





Please note that we don't have copies of your working functions, so it is hard for us to know how they work. MCVE expands to include Complete — which means "can be run".

– Jonathan Leffler
Mar 10 at 1:45












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55032224%2favl-tree-in-c-with-iterative-insertion%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55032224%2favl-tree-in-c-with-iterative-insertion%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved