Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Comment
by
navinp1912
· 13y ago · 0 comments
If you move what while (topK--) into the map loop , it becomes an online code for topK whereas what you wrote is an offline . If you want offline then pushing it into a priority_queue and then popping it out would be much faster.
Comments
No comments yet.
Better HN