Linked List in Golang
Linked List in Golang Linked List is a linear data structure like arrays, whereas, linked list doesn’t have element stored in contiguous locations, as arrays do. In simple words, we can say, lin...
Linked List in Golang Linked List is a linear data structure like arrays, whereas, linked list doesn’t have element stored in contiguous locations, as arrays do. In simple words, we can say, lin...
Leetcode - Sortest Word Distance(Premium) Given an array of strings words and two different strings that already exist in the array word1 and word2, return the shortest distance between these ...
Leetcode - 1512. Number of Good Pairs Given an array of integers nums, return the number of good pairs. A pair (i, j) is called good if nums[i] == nums[j] and i < j. Solution...
Leetcode - 125. Valid Palindrome A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same...
Leetcode - 345. Reverse Vowels of a String Given a string s, reverse only all the vowels in the string and return it. The vowels are ‘a’, ‘e’, ‘i’, ‘o’, and ‘u’, and they can appear ...
Leetcode - 1832. Check if the Sentence Is Pangram A pangram is a sentence where every letter of the English alphabet appears at least once. Given a string sentence containing only lo...
Leetcode - 704. Binary Search Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then ...
Leetcode - 20. Valid Parentheses Given a string s containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. An input string is valid if:...
Leetcode - 242. Valid Anagram Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of...
Leetcode - 167. Two Sum II - Input Array Is Sorted Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a ...