[Solved] Given two integer arrays arr1 and arr2, and the integer d, return the distance value between the two arrays.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given an m x n matrix of distinct numbers, return all lucky numbers in the matrix in any order. A lucky number is an element of the matrix such that it is the minimum element in its row and maximum in its column.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given two binary trees original and cloned and given a reference to a node target in the original tree. The cloned tree is a copy of the original tree.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given an integer n, return a string with n characters such that each character in such string occurs an odd number of times. The returned string must contain only lowercase English letters. If there are multiples valid strings, return any of them. Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is, for each nums[i] you have to count the number of valid j’s such that j != i and nums[j] < nums[i]. Return the answer in an array.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given a m x n matrix grid which is sorted in non-increasing order both row-wise and column-wise, return the number of negative numbers in grid.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given an integer num, return the number of steps to reduce it to zero.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] You are given an m x n binary matrix mat of 1’s (representing soldiers) and 0’s (representing civilians). The soldiers are positioned in front of the civilians. That is, all the 1’s will appear to the left of all the 0’s in each row.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] You are given a string s consisting only of letters ‘a’ and ‘b’. In a single step you can remove one palindromic subsequence from s. Return the minimum number of steps to make the given string empty.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given a binary tree root and an integer target, delete all the leaf nodes with value target.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] You are given a positive integer num consisting only of digits 6 and 9. Return the maximum number you can get by changing at most one digit (6 becomes 9, and 9 becomes 6).Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] No-Zero integer is a positive integer that does not contain any 0 in its decimal representation. Given an integer n, return a list of two integers [A, B] where:Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given the root of a binary tree, return the sum of values of nodes with an even-valued grandparent. If there are no nodes with an even-valued grandparent, return 0. A grandparent of a node is the parent of its parent if it exists.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] We are given a list nums of integers representing a list compressed with run-length encoding. Consider each adjacent pair of elements [freq, val] = [nums[2*i], nums[2*i+1]] (with i >= 0). For each such pair, there are freq elements with value val concatenated in a sublist. Concatenate all the sublists from left to right to generate the decompressed list. Return the decompressed list.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] You are given a string s formed by digits and ‘#’. We want to map s to English lowercase characters as follows: Characters (‘a’ to ‘i’) are represented by (‘1’ to ‘9’) respectively. Characters (‘j’ to ‘z’) are represented by (’10#’ to ’26#’) respectively.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given two binary search trees root1 and root2, return a list containing all the integers from both trees sorted in ascending order.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given an integer n, return any array containing n unique integers such that they add up to 0.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given the root of a binary tree, return the sum of values of its deepest leaves.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given an array arr, replace every element in that array with the greatest element among the elements to its right, and replace the last element with -1. After doing so, return the array.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given an array nums of integers, return how many of them contain an even number of digits.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022