# Order statistic tree in Java

**URL:** <https://discuss.codechef.com/t/order-statistic-tree-in-java/1523>\
**Category:** general\
**Tags:** balanced-tree, complexity, java-api, order-statistic, rank, trees\
**Created:** [February 4, 2013, 9:51pm UTC](https://discuss.codechef.com/t/order-statistic-tree-in-java/1523 "2013-02-04T21:51:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![vineetpaliwal](https://discuss.codechef.com/user_avatar/discuss.codechef.com/vineetpaliwal/32/3724_2.png) [@vineetpaliwal](https://discuss.codechef.com/u/vineetpaliwal)\
**Post date:** [February 23, 2013, 5:46pm UTC](https://discuss.codechef.com/t/order-statistic-tree-in-java/1523/2 "2013-02-23T17:46:53Z")

</div>

@everyone : Figured out the answer . There is no default implementation in java library for this . I had to modify Java’s TreeSet or TreeMap class to contain an extra field and extra function for implementing an order-statistic tree . Got the AC in contest timings itself . Cool 🙂

---

_[View the full topic](https://discuss.codechef.com/t/order-statistic-tree-in-java/1523)._
