partitionSelect.js 582 B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.partitionSelectDocs = void 0;
  6. var partitionSelectDocs = {
  7. name: 'partitionSelect',
  8. category: 'Matrix',
  9. syntax: ['partitionSelect(x, k)', 'partitionSelect(x, k, compare)'],
  10. description: 'Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.',
  11. examples: ['partitionSelect([5, 10, 1], 2)', 'partitionSelect(["C", "B", "A", "D"], 1)'],
  12. seealso: ['sort']
  13. };
  14. exports.partitionSelectDocs = partitionSelectDocs;