请问有什么办法能排一下?用泛型做一个优先队列,直接存的数字,最大的数优先出列,逻辑是每次添加后排序一次,然后出列出最后一个
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
我觉得用链表比较合适啊,按照顺序连起来,来了新的数字也不用重新排序,只要找到合适的位置插进去就行了