If you find this video helpful, please 'Like' or 'Subscribe'.
This is really helpful for the channel and also motivates me to do more of such good videos.
Leetcode 1167 Minimum Cost to Connect Sticks (Medium Complexity Problem)
LintCode 1872 Minimum Cost to Connect Sticks
Amazon Interview Question Solved Priority Queue
Link To The Problem:
https://leetcode.com/problems/minimum-cost-to-connect-sticks/
https://www.lintcode.com/problem/1872/description
Problem Description:
In order to decorate your new house, you need to process some sticks with positive integer length.
You can connect any two sticks of lengths X and Y into one stick by paying a cost of X + Y. Due to the construction needs, you must connect all the bars into one.
Return the minimum cost of connecting all the given sticks into one stick in this way.
Please note that you can choose any order of sticks connection
Youtube channel: https://www.youtube.com/channel/UCrvpRH4lSRjp2T6btl0lf4w
https://github.com/maksrane100/leetcode_solutions
#coding #softwareengineer #Leetcode #Algorithm #DataStructure #Java #programmer #tech #software #codinglife #Preparation
#interview #programminglife #programmingisfun