This commit is contained in:
2024-12-22 00:44:49 +08:00
parent fd842609c2
commit 21a96762be
3 changed files with 11 additions and 0 deletions
+1
View File
@@ -4,3 +4,4 @@ project(homework6)
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 20)
add_executable(test1 test1.cpp) add_executable(test1 test1.cpp)
add_executable(test2 test2.cpp)
+1
View File
@@ -35,4 +35,5 @@ int main() {
list<int> l={3,6,2,10,'l',8,5,7,4,9}; list<int> l={3,6,2,10,'l',8,5,7,4,9};
int index=seqSearch(l,5); int index=seqSearch(l,5);
cout<<index<<endl; cout<<index<<endl;
return 0;
} }
+9
View File
@@ -0,0 +1,9 @@
// 编写一个程序,输出在顺序表(1,2, 3, 4, 5, 6, 7, 8, 9, 10)中采用折半查找方法查找关键字9的过程。
#include<iostream>
#include<list>
using namespace std;
int main() {
return 0;
}