Modaupttktt
Modaupttktt
Cho a, b la 2 so nguyen duong, a > b, tim uoc chung lon nhat cua a va b?
gcd
%%%%%%%%%%%%%%%%%%%%%%%%%
Bai toan tinh luy thua:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Cho
- Cho danh sach cac giao dich trong 1 ngay nao do Transactions gom ma tai khoan
giao dich
(so tien giao dich, ....)
Tim:
- Danh sach cac giao dich hop le, tuc la cac giao dich co ma tai khoan
nam trong danh sach cac tai khoan hop le White list.
%%%%%%%%%%%%%%%%%%%%%%%%
sort(less,[9,5,8,2,7,1]);
sort(bigger, [5,9,2,6,1,8,3]);
sort(less,["quan","yen","binh"]);
-------------------
***qsort
qsort [4,2,5,1,8,6,9,7];
%%%%%%%%%%%%%%%%%%%%%%%%%%%
fun equal(x:int,y) = x=y
fun search(x, nil) = false | search(x, fst::rest) = if equal(x,fst) then true else
search(x,rest)
find 3 cay