Example of using array management functions for insertion sort and binary search.
28{
32
39
40
41
42
44
45 if (Result)
46 {
47 LogInfo(
"Index found: %d", Index);
48
50 }
51 else
52 {
54 }
55
57
58}
UCHAR BOOLEAN
Definition BasicTypes.h:39
unsigned __int64 UINT64
Definition BasicTypes.h:21
unsigned int UINT32
Definition BasicTypes.h:48
VOID BinarySearchPrintArray(UINT64 ArrayPtr[], UINT32 NumberOfItems)
A utility function to print an array of size NumberOfItems.
Definition BinarySearch.c:23
BOOLEAN BinarySearchPerformSearchItem(UINT64 ArrayPtr[], UINT32 NumberOfItems, UINT32 *ResultIndex, UINT64 Key)
A utility function to perform the binary search.
Definition BinarySearch.c:46
#define LogInfo(format,...)
Define log variables.
Definition HyperDbgHyperLogIntrinsics.h:71
BOOLEAN InsertionSortDeleteItem(UINT64 ArrayPtr[], UINT32 *NumberOfItems, UINT32 Index)
Function to implement insertion sort.
Definition InsertionSort.c:66
BOOLEAN InsertionSortInsertItem(UINT64 ArrayPtr[], UINT32 *NumberOfItems, UINT32 MaxNumOfItems, UINT64 Key)
Function to implement insertion sort.
Definition InsertionSort.c:24
#define MAX_NUM_OF_ARRAY
Maximum number of array for test cases.
Definition OptimizationsExamples.c:18