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…
व्हाट्सएप का डिफेंस एमिड रो ओवर लीक चैट्स इन ड्रग्स प्रोब
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…