Binary Search in Sorted Array with O(log n) Complexity

🚀 Day 42/150 of hashtag#150DaysOfDSA 📌 Task: Binary Search Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1. You must write an algorithm with O(log n) runtime complexity. #150DaysOfCode #DSA #CPP #Algorithms #CodingJourney #ProblemSolving

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories