Click here to Skip to main content
15,908,843 members

Comments by Member 12371341 (Top 8 by date)

Member 12371341 24-Apr-16 8:05am View    
Look my code was correct, i just wrote it wrong on the post

If you check my question again, that wasn't even the problem i had.

I didn't know how to get an object from an iterator...

My bad is that i typed the vector.size()-1, but i had it correct in my code.

I rejected the advice because it wasn't solving my problem.
Member 12371341 24-Apr-16 3:50am View    
Deleted
Thanks, this notation worked!

Member 12371341 24-Apr-16 3:42am View    
So i checked my code infact i had a regular for without -1 at the size, so thing worked.

"Learn C++ better before saying incorrect things"

I am a novice programmer and i agree i have a lot to learn, but why pointing it out.

Obviously i'm trying to learn by posting a question,

What's the point of being offensive?
Member 12371341 28-Mar-16 7:27am View    
Isn't my solution also a valid and balanced binary tree?

Given the definition : A tree is balanced if the distance from root to each node is equal or not greater then 1.

I think both of them look balanced.

I know we should try to balance them whenever we can since It allows faster times
at various operations on the tree.
Member 12371341 28-Mar-16 7:03am View    
I'm glad i's fine, regarding the reordering..
No bounds were written.
Guess I better do them the way they were given, but my solution at least from my point of view seemed a little bit more natural.

Thanks once again!