Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

typo in kth order statistic #1215

Closed
Closed
Labels
@lrvideckis

Description

@lrvideckis

"deterministic linear solution is implemented in C++ standard library asstd::nth_elemen"

https://cp-algorithms.com/sequences/k-th.html

but I think the STL implements the nondeterministic one/deterministic nlogn one

https://github.com/gcc-mirror/gcc/blob/9693459e030977d6e906ea7eb587ed09ee4fddbd/libstdc%2B%2B-v3/include/bits/stl_algo.h#L1913,L1933

  • looks like kth order on random pivots, then if depth is too large, switch to make heap; pop min element k times

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp