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.2 min read·Nov 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]…2 min read·Nov 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.2 min read·Nov 10, 2021--1--1
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…3 min read·Nov 8, 2021----
Snehakweera700. Search in a Binary Search TreeYou are given the root of a binary search tree (BST) and an integer val.2 min read·Nov 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…2 min read·Nov 6, 2021--1--1
Snehakweera169. Majority ElementGiven an array nums of size n, return the majority element.2 min read·Nov 6, 2021--1--1
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…3 min read·Nov 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…2 min read·Nov 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.2 min read·Nov 5, 2021----