quickselect

WebJar for quickselect

Лицензия

Лицензия

ISC
Категории

Категории

Github Инструменты разработки Контроль версий
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

github-com-mourner-quickselect
Последняя версия

Последняя версия

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

quickselect
WebJar for quickselect
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/mourner/quickselect

Скачать github-com-mourner-quickselect

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-mourner-quickselect/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-mourner-quickselect</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-mourner-quickselect/
implementation 'org.webjars.npm:github-com-mourner-quickselect:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-mourner-quickselect/
implementation ("org.webjars.npm:github-com-mourner-quickselect:2.0.0")
'org.webjars.npm:github-com-mourner-quickselect:jar:2.0.0'
<dependency org="org.webjars.npm" name="github-com-mourner-quickselect" rev="2.0.0">
  <artifact name="github-com-mourner-quickselect" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-mourner-quickselect', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "github-com-mourner-quickselect" % "2.0.0"
[org.webjars.npm/github-com-mourner-quickselect "2.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

quickselect Build Status

A tiny and fast selection algorithm in JavaScript (specifically, Floyd-Rivest selection).

quickselect(array, k[, left, right, compareFn]);

Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right].

  • array: the array to partially sort (in place)
  • k: middle index for partial sorting (as defined above)
  • left: left index of the range to sort (0 by default)
  • right: right index (last index of the array by default)
  • compareFn: compare function

Example:

var arr = [65, 28, 59, 33, 21, 56, 22, 95, 50, 12, 90, 53, 28, 77, 39];

quickselect(arr, 8);

// arr is [39, 28, 28, 33, 21, 12, 22, 50, 53, 56, 59, 65, 90, 77, 95]
//                                         ^^ middle index

Версии библиотеки

Версия
2.0.0