filmov
tv
Maximum Count of Positive Integer and Negative Integer | Leetcode 2529 | codestorywithMIK

Показать описание
Hi Everyone, this is the 8th video of our Playlist "Solving only using C++ STLs/JAVA JCF".
Now we will be solving a very easy problem - Maximum Count of Positive Integer and Negative Integer | Learn Something New | Leetcode 2529 | codestorywithMIK
Since this is a very easy problem, I have explained how to do it using STLs/JCF only. We will learn a lot of things from this video.
Problem Name : Maximum Count of Positive Integer and Negative Integer | Learn Something New | Leetcode 2529 | codestorywithMIK
Company Tags : will update later
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
Video Summary :
Approach 1 (Using STL count_if)
This approach counts positive and negative numbers separately using the count_if function with lambda expressions. It then returns the maximum of the two counts, ensuring we find the dominant sign in the array.
Approach 2 (Using lower_bound)
This approach leverages binary search to find the first occurrence of 1 (for positives) and 0 (for non-negatives). Using these indices, it determines the count of positive and negative numbers efficiently and returns the maximum of the two.
✨ Timelines✨
00:00 - Introduction
0:18 - Motivation
0:40 - Problem Explanation
1:34 - C++ count_if()
5:14 - JAVA stream and filters
12:49 - Coding C++ & Java using count
16:29 - Follow Up using Binary Search
18:19 - C++ lowerbound
23:15 - Java apnaLowerBound
27:03 - Coding C++ Java follow up
#MIK #mik #Mik
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #coding #programming #100daysofcode #developers #techjobs #datastructures #algorithms #webdevelopment #softwareengineering #computerscience #pythoncoding #codinglife #coderlife #javascript #datascience #leetcode #leetcodesolutions #leetcodedailychallenge #codinginterview #interviewprep #technicalinterview #interviewtips #interviewquestions #codingchallenges #interviewready #dsa #hindi #india #hindicoding #hindiprogramming #hindiexplanation #hindidevelopers #hinditech #hindilearning #helpajobseeker #jobseekers #jobsearchtips #careergoals #careerdevelopment #jobhunt #jobinterview #github #designthinking #learningtogether #growthmindset #digitalcontent #techcontent #socialmediagrowth #contentcreation #instagramreels #videomarketing #codestorywithmik #codestorywithmick #codestorywithmikc #codestorywitmik #codestorywthmik #codstorywithmik #codestorywihmik #codestorywithmiik #codeistorywithmik #codestorywithmk #codestorywitmick #codestorymik #codestorwithmik
Комментарии