Stories, Tutorials
& Life Tips
Deep dives on coding, health, recipes, travel and everything in between.
π Explore Reading Paths
Follow curated journeys from beginner to expert
Missing Number - Array - Easy - LeetCode
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1: Input: [3,0,1]Output: 2Example 2: Input: [9,6,4,2,3,5,7,0,1]Output: 8Noβ¦
Contains Duplicate II - Array - Easy - LeetCode
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such tβ¦
Contains Duplicate - Array - Easy - LeetCode
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appβ¦
Rotate Array - Array - Easy - LeetCode
Given an array, rotate the array to the right by k steps, where k is non-negative. Follow up: Try to come up with as manβ¦
Majority Element - Array - Easy - LeetCode
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊β¦
Best Time to Buy and Sell Stock II - Array - Easy - LeetCode
Say you have an array prices for which the ith element is the price of a given stock on day i. Design an algorithm to fiβ¦
Pascal's Triangle II - Array - Easy - LeetCode
Given an integer rowIndex, return the rowIndexth row of Pascal's triangle. Notice that the row index starts from 0. In Pβ¦
Pascal's Triangle - Array - Easy - LeetCode
Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each numberβ¦
Merge Sorted Array - Array - Easy - LeetCode
public class Solution { public void Merge(int[] nums1, int m, int[] nums2, int n) { int i=m-1; int jβ¦
Search Insert Position - Array - Easy - LeetCode
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it woulβ¦
Remove Element - Array - Easy - LeetCode
Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocβ¦
WhatsApp's Defense Amid Row Over Leaked Chats In Drugs Probe
The central agency has summoned actors Deepika Padukone and Shraddha Kapoor on basis of chats dating back to 2017, accesβ¦
Remove Duplicates from Sorted Array - Array - Easy - LeetCode
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new lenβ¦
Longest Palindrome Subsequence - Dynamic Porgramming
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s isβ¦

Sum of Even Numbers After Queries - Array - Easy - LeetCode
We have an array A of integers, and an array queries of queries. For the i-th query val = queries[i][0], index = querieβ¦