MCPcopy Create free account
hub / github.com/Berkeley-CS61B/lectureCode-sp16 / sort

Method sort

lec7/hugCode/Sort.java:23–34  ·  view source on GitHub ↗

Returns inputs in sorted order, sorting only the last k items. ([5, 3, 8, 1], 1) --> [5, 1, 3, 8]

(String[] inputs, int k)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

testSortMethod · 0.95

Calls 2

indexOfSmallestMethod · 0.95
swapMethod · 0.95

Tested by 1

testSortMethod · 0.76