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

Sum of Root To Leaf Binary Numbers - Tree - Easy - LeetCode
Featured

Sum of Root To Leaf Binary Numbers - Tree - Easy - LeetCode

You are given the root of a binary tree where each node has a value 0 or 1.  Each root-to-leaf path represents a binary number starting with the most significant bit.  For example, if the pa

1 min read9 Oct 2020
Read article
Cousins in Binary Tree - Tree - Easy - LeetCode

Cousins in Binary Tree - Tree - Easy - LeetCode

In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1. Two nodes of a binary

1 min9 Oct
Univalued Binary Tree - Tree - Easy - LeetCode

Univalued Binary Tree - Tree - Easy - LeetCode

A binary tree is univalued if every node in the tree has the same value. Return true if and only if the given tree is un

1 min9 Oct
Range Sum of BST - Tree - Easy - LeetCode

Range Sum of BST - Tree - Easy - LeetCode

Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive

1 min9 Oct
Increasing Order Search Tree - Tree - Easy - LeetCode

Increasing Order Search Tree - Tree - Easy - LeetCode

Given a binary search tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the

1 min9 Oct
Leaf-Similar Trees - Tree - Easy - LeetCode

Leaf-Similar Trees - Tree - Easy - LeetCode

Consider all the leaves of a binary tree, from left to right order, the values of those leaves form a leaf value sequenc

1 min9 Oct
Minimum Distance Between BST Nodes - Tree - Easy - LeetCode

Minimum Distance Between BST Nodes - Tree - Easy - LeetCode

Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two di

1 min9 Oct
Search in a Binary Search Tree - Tree - Easy - LeetCode

Search in a Binary Search Tree - Tree - Easy - LeetCode

Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node's valu

1 min9 Oct
Longest Univalue Path - Tree - Easy - LeetCode

Longest Univalue Path - Tree - Easy - LeetCode

Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may o

1 min8 Oct
Second Minimum Node In a Binary Tree - Tree - Easy - LeetCode

Second Minimum Node In a Binary Tree - Tree - Easy - LeetCode

Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has

1 min8 Oct
Trim a Binary Search Tree - Tree - Easy - LeetCode

Trim a Binary Search Tree - Tree - Easy - LeetCode

Given the root of a binary search tree and the lowest and highest boundaries as low and high, trim the tree so that all

1 min8 Oct
Two Sum IV - Input is a BST - Tree - Easy - LeetCode

Two Sum IV - Input is a BST - Tree - Easy - LeetCode

Given the root of a Binary Search Tree and a target number k, return true if there exist two elements in the BST such th

1 min8 Oct
Average of Levels in Binary Tree - Tree - Easy - LeetCode

Average of Levels in Binary Tree - Tree - Easy - LeetCode

Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.Example 1:Inp

1 min8 Oct
Merge Two Binary Trees - Tree - Easy - LeetCode

Merge Two Binary Trees - Tree - Easy - LeetCode

Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are ove

2 min8 Oct
Construct String from Binary Tree - Tree - Easy - LeetCode

Construct String from Binary Tree - Tree - Easy - LeetCode

You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way.

1 min7 Oct