This article concludes the Golang implementation that combines all the variations of the L#200 island problem: Features Included: Golang Implementation: Explanation: Example Output: Complexity Analysis: This Golang implementation is optimized for different…
Tag: leetcode
LC#695. Max Area of Island
Leetcode 695. Max Area of Island is an extension of the island problem where we need to find the largest island in a grid of 1s (land) and 0s (water). Problem Statement…
Leetcode 17 – Letter Combinations of a Phone Number
Description: Given a string containing digits from 2 to 9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order. A mapping of digit to…
Palindrome Problems Summary
Palindrome problems 1. Basic algorithm to check palindrome This section presents methods for checking if a string is a palindrome: 1.1 Check if a substring is palindrome at i and expand it….
Find the first and last occurrence in an array
To find the first occurrence of a target value in a sorted array using binary search, the algorithm needs to be slightly modified from the standard binary search. The goal is to…
Power of 2[Leetcode231]
You can check if a number is a power of 2 using recursion in Java by repeatedly dividing the number by 2 and checking if it eventually becomes 1. If it does,…