Master in Data Science/Informatics 2
[Algorithm/알고리즘] Exercise 3: Algorithm Analysis(알고리즘 분석)
Task 1 Consider an array A with n distinct integers that are sorted in an ascending order and an integer t. a) The C funtion linear search traverses the integers in A, one after another, from the beginning. If t is found in A linear search returns 1, otherwise 0. Complete the C funtion linear search(int A[], int n, int t) in task1.c file. int linear_search(int A[], int n, int t) { for (int i=0; ..
2023. 4. 1. 06:50
최근댓글