Leetcode solutions

Erect the Fence Leetcode Solution

Problem  You are given an array  trees  where  trees[i] = [x i , y i ]  represents the location of a tree in the garden. You are asked to fence the entire garden using the minimum length of rope as it is expensive. The garden is …

Remove All Adjacent Duplicates In String Leetcode Solution

Problem You are given a string   s   consisting of lowercase English letters. A   duplicate removal   consists of choosing two   adjacent   and   equal   letters and removing them. We repeatedly make  duplicate removals  on  s  u…

Odd String Difference Leetcode Solution in C++

Problem You are given an array of equal-length strings  words . Assume that the length of each string is  n . Each string  words[i]  can be converted into a  difference integer array   difference[i]  of length  n - 1  where  diff…

Load More
That is All