new files
This commit is contained in:
parent
3af7344581
commit
86c034bb8b
1364 changed files with 21352 additions and 0 deletions
11
Task/Binary-search/PicoLisp/binary-search-2.l
Normal file
11
Task/Binary-search/PicoLisp/binary-search-2.l
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(de iterativeSearch (Val Lst Len)
|
||||
(use (N L)
|
||||
(loop
|
||||
(T (=0 Len))
|
||||
(setq
|
||||
N (inc (/ Len 2))
|
||||
L (nth Lst N) )
|
||||
(T (= Val (car L)) Val)
|
||||
(if (> Val (car L))
|
||||
(setq Lst (cdr L) Len (- Len N))
|
||||
(setq Len (dec N)) ) ) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue