Average-case analysis of red-black trees