LeetCode Solutions

1750. Minimum Length of String After Deleting Similar Ends

1750. Minimum Length of String After Deleting Similar Ends

Problem Link :  1750. Minimum Length of String After Deleting Similar Ends  [LeetCode] Problem Level : Medium Topics :  Two Pointers  String Time : O(n) Space : O(1) Problem Description : 1750. Minimum Length of String After Deleting Similar Ends Given a string s consisting only of characters ‘a’, ‘b’, and ‘c’. You are asked to apply the following algorithm […]

1750. Minimum Length of String After Deleting Similar Ends Read More »

2864. Maximum Odd Binary Number

2864. Maximum Odd Binary Number

Problem Link :  2864. Maximum Odd Binary Number  [LeetCode] Problem Level : Easy Topics :  Math  String  Greedy Time: O(n) Space: O(1) Problem Description : 2864. Maximum Odd Binary Number You are given a binary string s that contains at least one ‘1’. You have to rearrange the bits in such a way that the resulting binary number is the maximum odd binary

2864. Maximum Odd Binary Number Read More »

Blue Geometric Technology LinkedIn Banner 1

787. Cheapest Flights Within K Stops

Problem Link :  787. Cheapest Flights Within K Stops  [LeetCode] Problem Level : Medium Topics : Dynamic Programming,   Depth-First Search,   Breadth-First,    SearchGraphHeap (Priority Queue) Problem Description : 787. Cheapest Flights Within K Stops There are n cities connected by some number of flights. You are given an array flights where flights[i] = [fromi, toi, pricei] indicates that there is a

787. Cheapest Flights Within K Stops Read More »

Scroll to Top