diff --git a/bin/FLanguage.exe b/bin/FLanguage.exe new file mode 100644 index 0000000..7def13b Binary files /dev/null and b/bin/FLanguage.exe differ diff --git a/bin/Library/BinarySearch.txt b/bin/Library/BinarySearch.txt new file mode 100644 index 0000000..493853d --- /dev/null +++ b/bin/Library/BinarySearch.txt @@ -0,0 +1,19 @@ +Ff Run(array,value){ + let low=0; + let high=len(array)-1; + let i=len(array)/2; + while (lowarray[i]){ + low=i+1; + }else{ + high=i; + } + i=(high+low)/2; + } + ret -1; +} +END diff --git a/bin/Library/Tree.txt b/bin/Library/Tree.txt new file mode 100644 index 0000000..92885e8 --- /dev/null +++ b/bin/Library/Tree.txt @@ -0,0 +1,44 @@ +Ff AddNode(value,node){ + if(len(node)==0){ + ret [[],value,[]]; + } + if(value>node[1]){ + node[2]=Tree_AddNode(value,node[2]); + }else{ + node[0]=Tree_AddNode(value,node[0]); + } + ret node; +} + +Ff MakeTree(list){ + let i=1; + let node=[[],list[0],[]]; + let ordered=newArray(len(list),0); + let v=0; + while(i