Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Implementation for WEIRDFN on SPOJ using Red black tree giving TLE

$
0
0

I implemented WEIRDFN on SPOJ link(http://www.spoj.com/problems/WEIRDFN/) using red-black trees which is much similar to Codechef problem RRATING which got AC using same implementation . How much difference can come if using priority queue or heaps instead of red black trees if in all cases (correct me if i am wrong) query can be satisfied in log n time ?? WHY time limit is exceeding for RB tress while its getting AC using heaps??


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>