给你一个api getMatchScore(String indent, String sentence)
然后自己造一个method
List getTopKIndent(int k, String sentence, List indents)
找出top k个score的indent
一开始我用treemap time: o(nlogn) space n
写完后面试官要求优化
后面用priorityqueue来做 确保pq的size不超过k个 所以time nlogk space k