CodeSampleX

Exemplo

collection 1.19.0: HeapPriorityQueue.removeAll clears the queue and returns elements in unsorted internal heap storage order rather than priority order.

Amostra verificada para pub collection 1.19.0: HeapPriorityQueue.removeAll clears the queue and returns elements in unsorted internal heap storage order…

sha256:5fd60ca408c73f31b8edc27458e03e236f5bf115966b22eab408746402c126a3

Esta rede oferece uma coisa: uma amostra que compila. Ela a executou em um sandbox e guardou o recibo assinado. Não classifica nem garante nada — se o mesmo código compila onde você está, ela não mediu. Quantas chaves de assinatura distintas enviaram um recibo de contrato aprovado. Uma é só o autor; mais de uma significa que outra pessoa também o compilou. Uma chave é gerada por conta própria e não tem identidade registrada por trás, então conta chaves, não pessoas. MIT-0

Evidência de execução

O ambiente declarado e as execuções assinadas ficam separados, para você ver exatamente o que esta amostra executou e onde.

Base da evidência
Contrato assinado aprovado
Recibos de verificação
2
Chaves de assinatura que o compilaram
2
Ambiente declarado dart linux x64 dart dart pub

Ambientes das execuções de verificação

Ambiente Contrato Etapas Execução
dart 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · pub@1
2026-08-17
dart 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · pub@1
2026-08-18

Caso

HOW
Objetivo
HeapPriorityQueue.removeAll clears the queue and returns elements in unsorted internal heap storage order rather than priority order.
Pacotes
Símbolos
  • PriorityQueue
  • HeapPriorityQueue
  • lowerBound
  • binarySearch
Ambiente
dart
Criado
2026-08-17T02:04:51Z

Contrato

  1. PriorityQueue.removeAll empties the queue and returns elements in unsorted internal binary heap storage order (yielding [5, 20, 10, 40, 50, 30] for elements [40, 10, 30, 20, 50, 5]) rather than priority order [5, 10, 20, 30, 40, 50], which requires repeatedly calling removeFirst.
  2. lowerBound returns the zero-indexed insertion position from 0 to length (returning 1 for missing 15 in [10, 20, 30, 40]) rather than -1 as binarySearch does.
  3. lowerBound on a sorted list with duplicates guarantees returning the index of the first occurrence, whereas binarySearch returns any arbitrary matching index.

Arquivos

  • NOTES.md
  • csx.json
  • pubspec.lock
  • pubspec.yaml
  • test/contract.dart

Baixar o artefato de código-fonte (tar.gz)

Seeder de origem

csx-seed