Day 26 of #GFG160DaysChallenge Problem solved: Given an array of Intervals arr[][], where arr[i] = [starti, endi]. The task is to merge all of the overlapping Intervals. #geekstreak2024 #gfg160
Akshat Shukla’s Post
More Relevant Posts
-
Day 28 of #GFG160DaysChallenge Problem solved: A sorted array of distinct elements arr[] is rotated at some unknown point, the task is to find the minimum element in it. #geekstreak2024 #gfg160
To view or add a comment, sign in
-
Day 30 of #GFG160DaysChallenge Problem solved: Given a sorted and rotated array arr[] of distinct elements, the task is to find the index of a target key. Return -1 if the key is not found. #geekstreak2024 #gfg160
To view or add a comment, sign in
-
Day 29 of #GFG160DaysChallenge Problem solved: Given an array arr[] where no two adjacent elements are same, find the index of a peak element. An element is considered to be a peak if it is greater than its adjacent elements (if they exist). If there are multiple peak elements, return index of any one of them. The output will be "true" if the index returned by your function is correct; otherwise, it will be "false". #geekstreak2024 #gfg160
To view or add a comment, sign in
-
🎉 Day 21 of #GFG160DaysChallenge Completed! 🎉 Problem: Given a sorted and rotated array arr[] of distinct elements, find the index of the target key. Return -1 if the key is not found. Feeling accomplished and ready for Day 22! 🚀 #GFG #GFG160 #WomenInTech #GeekStreak2024
To view or add a comment, sign in
-
Day-24(21/12/24) Problem is to: Given an array of Intervals arr[][], where arr[i] = [starti, endi]. The task is to merge all of the overlapping Intervals. 💥 💥 #gfg160 ✨ #gfgstreak2024 #dsa ✨
To view or add a comment, sign in
-
Day 11/160 of #GFG160! Given an array arr[] that contains positive and negative integers (may contain 0 as well). Find the maximum product that we can get in a subarray of arr. Note: It is guaranteed that the output fits in a 32-bit integer. Example Input: arr[] = [-2, 6, -3, -10, 0, 2] Output: 180 Explanation: The subarray with maximum product is {6, -3, -10} with product = 6 * (-3) * (-10) = 180. #gfg160 #geekstreak2024 #womenintech
To view or add a comment, sign in
-
Day 12 of the #100dayschallenge Day 6 of the #gfg160 challenge Today'S Problem : Majority Element II Input: arr[] = [2, 1, 5, 5, 5, 5, 6, 6, 6, 6, 6] Output: [5, 6] Explanation: 5 and 6 occur more n/3 times. @geeksforgeeks #gfg160 #greeksteak2024
To view or add a comment, sign in
-
Day 10/160 🚀 Another milestone in the #gfg160 journey! Today, I solved the 'Find Majority Element' problem, enhancing my problem-solving skills and understanding of efficient algorithms. 🔍💻 Every step forward counts in building a strong foundation for the future. 🌟 #geekstreak2024 #codingjourney #gfg160 and #geekstreak2024
To view or add a comment, sign in
-
Day 2 of #GFG160DaysChallenge Problem solved: You are given an array of integers arr[]. Your task is to reverse the given array. What I Learned: The use of two pointers (left and right) to reverse an array in-place efficiently. #geekstreak2024 #gfg160
To view or add a comment, sign in
-
🎉 Day 21 of #GFG160DaysChallenge Completed! 🎉 🚀 Today's Problem: Question: Given a 2D array of intervals arr[][], where arr[i] = [starti, endi], return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. Solution: I used a greedy algorithm to solve this problem efficiently! By sorting the intervals based on their end times and iterating through them, I was able to determine the overlaps and count the intervals that needed removal to achieve non-overlapping intervals. Feeling super accomplished and ready to tackle Day 15! 🚀 #gfg160 #WomenInTech #geekstreak2024
To view or add a comment, sign in