• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
November 05, 2023 |1.6K Views
PROBLEM OF THE DAY: 04/11/2023 | Find Transition Point
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Siddharth Hazra. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Binary Search but also build up problem-solving skills.

In this video, we are given, a sorted array containing only 0s and 1s, find the transition point, i.e., the first index where 1 was observed, and before that, only 0 was observed.

Example :

Input:
N = 5
arr[] = {0,0,0,1,1}
Output: 3

Explanation: index 3 is the transition point where 1 begins.

Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/find-transition-point-1587115620/1
Solution IDE Link: https://ide.geeksforgeeks.org/online-cpp-compiler/bae6234a-90dd-40fe-bb7b-1db7b4f47b79