Untitled
unknown
plain_text
5 months ago
199 B
8
Indexable
} return(-1) # Not found } # Example usage vec <- c(5, 2, 9, 1, 7) sorted_vec <- quick_sort(vec) print(sorted_vec) position <- binary_search(sorted_vec, 7) cat("Position of 7:", position)
Editor is loading...
Leave a Comment