Lompat ke isi

Modul:Exponential search: Riwayât rèvisi

Pèlè ḍuwâ' tora (bârna bhiru tasè' è bâbâ) terros pècè' "bhânḍhingngaghi" mon abhânḍhingngaghina vèrsi sè èkaterrowè. Klik sèttong tangghâl mon nèngguwâ vèrsi kaca è tangghâl kasebbhut.
Panegghes: (satèya) = bhidhâ jângkènè, (sabelluna) = bhidhâ bi' vèrsi sabelluna, k = beccè'an kènè'.

3 Oktober 2024

  • satèyasabelluna 03.143 Oktober 2024 03.14 Munajad.MH kanḍhâ dhurrun 1.092 bita +1.092 ←Membuat halaman berisi '-- This module provides a generic exponential search algorithm. requirestrict local checkType = require('libraryUtil').checkType local floor = math.floor local function midPoint(lower, upper) return floor(lower + (upper - lower) / 2) end local function search(testFunc, i, lower, upper) if testFunc(i) then if i + 1 == upper then return i end lower = i if upper then i = midPoint(lower, upper) else i = i * 2 end return search(testFunc...'