Find Polygon With the Largest Perimeter | Thought Process | Greedy | Leetcode 2971
iPad PDF Notes - https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/iPad%20PDF%20Notes/Leetcode-2971-Find%20Polygon%20with%20the%20largest%20Perimeter.pdf
Whatsapp Community Link : https://www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A
This is the 26th Video of our Playlist "Greedy : Popular Interview Problems".
We will try to understand the thought process behind solving such Qns.
Problem Name : Find Polygon With the Largest Perimeter | Leetcode 2971
Company Tags : will update soon
My solutions on Github : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/Greedy/Find%20Polygon%20With%20the%20Largest%20Perimeter.cpp
Leetcode Link : https://leetcode.com/problems/find-polygon-with-the-largest-perimeter/
Approach Summary :
The goal is to find the largest possible perimeter of a non-degenerate triangle formed by three elements from the given vector. The approach involves sorting the input vector in ascending order. Then, it iterates through the sorted vector, maintaining a cumulative sum and updating the perimeter when a valid triangle is found. If no valid triangle is found, the method returns -1.
My Recursion Concepts Playlist : https://www.youtube.com/watch?v=pfb1Zduesi8&list=PLpIkg8OmuX-IBcXsfITH5ql0Lqci1MYPM
My DP Concepts Playlist : https://youtu.be/7eLMOE1jnls
My Graph Concepts Playlist : https://youtu.be/5JGiZnr6B5w
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Subscribe to my channel : https://www.youtube.com/@codestorywithMIK
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Twitter : https://twitter.com/CSwithMIK
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
#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 #2024 #newyear