I implemented avl tree and works correctly, if keys are different or duplicates are not so much. When i try to insert or delete 10000 times random keys in range [0;5] in some moment tree becomes not avl. Is there any reason that rotations broke avl tree constraints if keys duplicates?
No,it always should be balanced if you follow rotation rules correctly even when there's duplicates
I think that the only possible reason is that your implementation isn't correct :)
I solved it!