[Solved] Given the head of a singly linked list, return the middle node of the linked list. If there are two middle nodes, return the second middle node.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Consider all the leaves of a binary tree, from left to right order, the values of those leaves form a leaf value sequence.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given a 2D integer array matrix, return the transpose of matrix. The transpose of a matrix is the matrix flipped over its main diagonal, switching the matrix’s row and column indices.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] An array arr a mountain if the following properties hold: arr.length >= 3, There exists some i with 0 < i < arr.length - 1 such that:Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given two strings s and t, return true if they are equal when both are typed into empty text editors. ‘#’ means a backspace character.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] There are n rooms labeled from 0 to n – 1 and all the rooms are locked except for room 0. Your goal is to visit all the rooms. However, you cannot enter a locked room without having its key.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given an n x n binary matrix image, flip the image horizontally, then invert it, and return the resulting image. To flip an image horizontally means that each row of the image is reversed.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] You are given a string sentence that consist of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to convert the sentence to “Goat Latin” (a made-up language similar to Pig Latin.) The rules of Goat Latin are as follows:Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given a string s and a character c that occurs in s, return an array of integers answer where answer.length == s.length and answer[i] is the distance from index i to the closest occurrence of character c in s.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given the root of a binary tree, return the same tree where every subtree (of the given tree) not containing a 1 has been removed. A subtree of a node node is node plus every node that is a descendant of node.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] A website domain “discuss.leetcode.com” consists of various subdomains. At the top level, we have “com”, at the next level, we have “leetcode.com” and at the lowest level, “discuss.leetcode.com”. When we visit a domain like “discuss.leetcode.com”, we will also visit the parent domains “leetcode.com” and “com” implicitly.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] You are given a string s of lowercase English letters and an array widths denoting how many pixels wide each lowercase English letter is. Specifically, widths[0] is the width of ‘a’, widths[1] is the width of ‘b’, and so on.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: ‘a’ maps to “.-“, ‘b’ maps to “-…”,Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] An integer x is a good if after rotating each digit individually by 180 degrees, we get a valid number that is different from x. Each digit must be rotated – we cannot choose to leave it alone.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given a string s, you can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible strings we could create. Return the output in any order.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] You’re given strings jewels representing the types of stones that are jewels, and stones representing the stones you have. Each character in stones is a type of stone you have. You want to know how many of the stones you have are also jewels.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given an m x n matrix, return true if the matrix is Toeplitz. Otherwise, return false. A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same elements.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] You are given an integer array cost where cost[i] is the cost of ith step on a staircase. Once you pay the cost, you can either climb one or two steps. You can either start from the step with index 0, or the step with index 1.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given a characters array letters that is sorted in non-decreasing order and a character target, return the smallest character in the array that is larger than target.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022