1,724 articles across 10 categories

Stories, Tutorials & Life Tips

Deep dives on coding, health, recipes, travel and everything in between.

How to find Nth node from the end of a Linked List?
⭐ Blog of the Daycoding
How to find Nth node from the end of a Linked List?

Given a linked list, remove the nth node from the end of the list and return its head. For example, Given linked list: 1->2->3->4->5, an

1 min read
Read Now →

📍 Explore Reading Paths

Follow curated journeys from beginner to expert

Subsets - Array - Medium - LeetCode
Featured

Subsets - Array - Medium - LeetCode

Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. Example: Input: nums = [1,2,3]Output:[  [3], 

1 min read31 Oct 2020
Read article
Sort Colors - Array - Medium - LeetCode

Sort Colors - Array - Medium - LeetCode

Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are

1 min31 Oct
Search a 2D Matrix - Array - Medium - LeetCode

Search a 2D Matrix - Array - Medium - LeetCode

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Int

1 min31 Oct
Set Matrix Zeroes - Array - Medium - LeetCode

Set Matrix Zeroes - Array - Medium - LeetCode

Given an m x n matrix. If an element is 0, set its entire row and column to 0. Do it in-place. Follow up: A straight for

1 min31 Oct
Minimum Path Sum - Array - Medium - LeetCode

Minimum Path Sum - Array - Medium - LeetCode

Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum o

1 min31 Oct
Unique Paths II - Array - Medium - LeetCode

Unique Paths II - Array - Medium - LeetCode

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move

1 min31 Oct
Unique Paths - Array - Medium - LeetCode

Unique Paths - Array - Medium - LeetCode

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move

1 min31 Oct
Spiral Matrix II - Array - Medium - LeetCode

Spiral Matrix II - Array - Medium - LeetCode

Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. Example: Input:

1 min31 Oct
Insert Interval - Array - Medium - LeetCode

Insert Interval - Array - Medium - LeetCode

Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume

1 min31 Oct
Slowest Key - Array - Easy - LeetCode

Slowest Key - Array - Easy - LeetCode

A newly designed keypad was tested, where a tester pressed a sequence of n keys, one at a time. You are given a string k

2 min31 Oct
Merge Intervals - Array - Medium - LeetCode

Merge Intervals - Array - Medium - LeetCode

Given a collection of intervals, merge all overlapping intervals. Example 1: Input: intervals = [[1,3],[2,6],[8,10],[15,

1 min30 Oct
Jump Game - Array - Medium - LeetCode

Jump Game - Array - Medium - LeetCode

Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in t

1 min28 Oct
Spiral Matrix - Array - Medium - LeetCode

Spiral Matrix - Array - Medium - LeetCode

Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example 1: Inpu

1 min27 Oct
Rotate Image - Array - Medium - LeetCode

Rotate Image - Array - Medium - LeetCode

You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate t

1 min26 Oct
Combination Sum II - Array - Medium - LeetCode

Combination Sum II - Array - Medium - LeetCode

Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candi

1 min25 Oct