Hhimanshuinblogs-himanshu.hashnode.dev·Feb 28 · 3 min readDay 20 - Search in Rotated Sorted ArrayQuestion You are given an array of length n which was originally sorted in ascending order. It has now been rotated between 1 and n times. For example, the array nums = [1,2,3,4,5,6] might become: [300
Hhimanshuinblogs-himanshu.hashnode.dev·Feb 22 · 3 min readDay 18 - Koko Eating BananasQuestion You are given an integer array piles where piles[i] is the number of bananas in the ith pile. You are also given an integer h, which represents the number of hours you have to eat all the ban00
Hhimanshuinblogs-himanshu.hashnode.dev·Feb 21 · 3 min readDay 17 - Search a 2d MatrixQuestion You are given an m x n 2-D integer array matrix and an integer target. Each row in matrix is sorted in non-decreasing order. The first integer of every row is greater than the last integer 00
Hhimanshuinblogs-himanshu.hashnode.dev·Feb 20 · 4 min readDay 16 - Daily TemperaturesQuestion You are given an array of integers temperatures where temperatures[i] represents the daily temperatures on the ith day. Return an array result where result[i] is the number of days after the 00
Hhimanshuinblogs-himanshu.hashnode.dev·Feb 19 · 2 min readDay 15 - Evaluate Reverse Polish NotationQuestion You are given an array of strings tokens that represents a valid arithmetic expression in Reverse Polish Notation. Return the integer that represents the evaluation of the expression. The operands may be integers or the results of other ope...00
Hhimanshuinblogs-himanshu.hashnode.dev·Feb 18 · 3 min readDay 14 - Min StackQuestion Design a stack class that supports the push, pop, top, and getMin operations. MinStack() initializes the stack object. void push(int val) pushes the element val onto the stack. void pop() removes the element on the top of the stack. int ...00
Hhimanshuinblogs-himanshu.hashnode.dev·Feb 16 · 2 min readDay 13 - Valid ParenthesisQuestion You are given a string s consisting of the following characters: '(', ')', '{', '}', '[' and ']'. The input string s is valid if and only if: Every open bracket is closed by the same type of close bracket. Open brackets are closed in the c...00
Hhimanshuinblogs-himanshu.hashnode.dev·Feb 15 · 3 min readDay 12 - 3SumQuestion Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] where nums[i] + nums[j] + nums[k] == 0, and the indices i, j and k are all distinct. The output should not contain any duplicate triplets. You may return the ou...00
Hhimanshuinblogs-himanshu.hashnode.dev·Feb 13 · 2 min readDay 11 - Two Integer Sum IIQuestion Given an array of integers numbers that is sorted in non-decreasing order. Return the indices (1-indexed) of two numbers, [index1, index2], such that they add up to a given target number target and index1 < index2. Note that index1 and index...00
Hhimanshuinblogs-himanshu.hashnode.dev·Feb 12 · 2 min readDay 10 - Valid PalindromeQuestion Given a string s, return true if it is a palindrome, otherwise return false. A palindrome is a string that reads the same forward and backward. It is also case-insensitive and ignores all non-alphanumeric characters. Note: Alphanumeric chara...00