[Solved] We define the usage of capitals in a word to be right when one of the following cases holds: All letters in this word are capitals, like “USA”. All letters in this word are not capitals, like “leetcode”. Only the first letter in this word is capital, like “Google”.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given a string s, find the longest palindromic subsequence’s length in s. A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given the root of a binary tree, return an array of the largest value in each row of the tree (0-indexed).Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is,Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given the root of a binary search tree (BST) with duplicates, return all the mode(s) (i.e., the most frequently occurred element) in it. If the tree has more than one mode, return them in any order.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given an array of strings words, return the words that can be typed using letters of the alphabet on only one row of American keyboard like the image below.Leetcode SolutionsAbhishek SharmaSeptember 26, 2022
[Solved] Given a binary array nums, return the maximum number of consecutive 1’s in the array.Leetcode SolutionsAbhishek SharmaSeptember 26, 2022
[Solved] Given a string queryIP, return “IPv4” if IP is a valid IPv4 address, “IPv6” if IP is a valid IPv6 address or “Neither” if IP is not a correct IP of any type.Leetcode SolutionsAbhishek SharmaSeptember 26, 2022
[Solved] You are given row x col grid representing a map where grid[i][j] = 1 represents land and grid[i][j] = 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one island (i.e., one or more connected land cells).Leetcode SolutionsAbhishek SharmaSeptember 26, 2022
[Solved] The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, return the Hamming distance between them.Leetcode SolutionsAbhishek SharmaSeptember 26, 2022
[Solved] Given an array nums of n integers where nums[i] is in the range [1, n], return an array of all the integers in the range [1, n] that do not appear in nums.Leetcode SolutionsAbhishek SharmaSeptember 26, 2022
[Solved] You have n coins and you want to build a staircase with these coins. The staircase consists of k rows where the ith row has exactly i coins. The last row of the staircase may be incomplete. Given the integer n, return the number of complete rows of the staircase you will build.Leetcode SolutionsAbhishek SharmaSeptember 26, 2022
[Solved] Given an integer n, return a string array answer (1-indexed) where: answer[i] == “FizzBuzz” if i is divisible by 3 and 5. answer[i] == “Fizz” if i is divisible by 3. answer[i] == “Buzz” if i is divisible by 5. answer[i] == i (as a string) if none of the above conditions are true.Leetcode SolutionsAbhishek SharmaSeptember 26, 2022
[Solved] Given the root of a binary tree, return the sum of all left leaves. A leaf is a node with no children. A left leaf is a leaf that is the left child of another node.Leetcode SolutionsAbhishek SharmaSeptember 26, 2022
[Solved] Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1.Leetcode SolutionsAbhishek SharmaSeptember 25, 2022
[Solved] Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence of a string is a new string that is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (i.e., “ace” is a subsequence of “abcde” while “aec” is not).Leetcode SolutionsAbhishek SharmaSeptember 25, 2022
[Solved] You are given two strings s and t. String t is generated by random shuffling string s and then add one more letter at a random position. Return the letter that was added to t.Leetcode SolutionsAbhishek SharmaSeptember 25, 2022
[Solved] Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine and false otherwise.Leetcode SolutionsAbhishek SharmaSeptember 25, 2022
[Solved] We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wrong, I will tell you whether the number I picked is higher or lower than your guess. You call a pre-defined API int guess(int num), which returns three possible results:Leetcode SolutionsAbhishek SharmaSeptember 25, 2022
[Solved] Given a positive integer num, write a function which returns True if num is a perfect square else False.Leetcode SolutionsAbhishek SharmaSeptember 25, 2022