All articles about LeetCode Medium

LeetCode #34 Find First and Last Position of Element in Sorted Array Solution & Explanation

Efficiently navigate array search challenges with the binary search algorithm for precise target position discovery

LeetCode #122 Best Time to Buy and Sell Stock II Solution & Explanation

Best time to buy and sell the stock?
We can follow a easy principle of “Buy at dip and Sell at tip” Ha Ha!!

LeetCode #28 Find the Index of the First Occurrence in a String Solution & Explanation

Hmm, if find return index else -1, that seems familiar. Included C#, Java ,Python3, JavaScript different solutions with explanation