Snehakweera977. Squares of a Sorted ArrayGiven an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order.Nov 11, 2021Nov 11, 2021
Snehakweera153. Find Minimum in Rotated Sorted ArraySuppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7]…Nov 11, 2021Nov 11, 2021
Snehakweera1. Two SumGiven an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.Nov 10, 20211Nov 10, 20211
Snehakweera701. Insert into a Binary Search TreeYou are given the root node of a binary search tree (BST) and a value to insert into the tree. Return the root node of the BST after the…Nov 8, 2021Nov 8, 2021
Snehakweera700. Search in a Binary Search TreeYou are given the root of a binary search tree (BST) and an integer val.Nov 7, 2021Nov 7, 2021
Snehakweera66. Plus OneYou are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are…Nov 6, 20211Nov 6, 20211
Snehakweera169. Majority ElementGiven an array nums of size n, return the majority element.Nov 6, 20211Nov 6, 20211
Snehakweera545. Boundary of Binary TreeGiven a binary tree, return the values of its boundary in anti-clockwise direction starting from root. Boundary includes left boundary…Nov 6, 2021Nov 6, 2021
Snehakweera103. Binary Tree Zigzag Level Order TraversalGiven the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to…Nov 6, 2021Nov 6, 2021
Snehakweera100. Same TreeGiven the roots of two binary trees p and q, write a function to check if they are the same or not.Nov 5, 2021Nov 5, 2021