Skip to content

Latest commit

 

History

History

0x1E-search_algorithms

Search Algorithms

Questions Answers
What is a search algorithm a search algorithm is an algorithm designed to solve a search problem. It's a method or a set of rules that are used to find a specific item or information within a collection of data.
What is a linear search linear search is a method for finding an element within a list
What is a binary search binary search is a more efficient search algorithm, especially for sorted collections. It works by repeatedly dividing the search interval in half until the target item is found or the search interval becomes empty.

TASKS

0-linear.c:

Write a function that searches for a value in an array of integers using the Linear search algorithm

1-binary.c:

Write a function that searches for a value in a sorted array of integers using the Binary search algorithm

2-O:

What is the time complexity (worst case) of a linear search in an array of size n?

3-O:

What is the space complexity (worst case) of an iterative linear search algorithm in an array of size n?

4-O:

What is the time complexity (worst case) of a binary search in an array of size n?

5-O:

What is the space complexity (worst case) of a binary search in an array of size n?

ADVANCED TASKS

100-jump.c:

Write a function that searches for a value in a sorted array of integers using the Jump search algorithm

101-O:

What is the time complexity (average case) of a jump search in an array of size n, using step = sqrt(n)?

102-interpolation.c:

Write a function that searches for a value in a sorted array of integers using the Interpolation search algorithm

103-exponential.c:

Write a function that searches for a value in a sorted array of integers using the Exponential search algorithm

104-advanced_binary.c:

Write a function that searches for a value in a sorted array of integers.

105-jump_list.c:

Write a function that searches for a value in a sorted list of integers using the Jump search algorithm.

106-linear_skip.c:

Write a function that searches for a value in a sorted skip list of integers.

107-O:

What is the time complexity (average case) of a jump search in a singly linked list of size n, using step = sqrt(n)?

108-O:

What is the time complexity (average case) of a jump search in a skip list of size n, with an express lane using step = sqrt(n)?