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

N-ary Tree Postorder Traversal - Tree - Easy - LeetCode
Featured

N-ary Tree Postorder Traversal - Tree - Easy - LeetCode

Given an n-ary tree, return the postorder traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversal, each group of children is separated by the null v

1 min read7 Oct 2020
Read article
N-ary Tree Preorder Traversal - Tree - Easy - LeetCode

N-ary Tree Preorder Traversal - Tree - Easy - LeetCode

Given an n-ary tree, return the preorder traversal of its nodes' values. Nary-Tree input serialization is represented in

1 min7 Oct
Subtree of Another Tree - Tree - Easy - LeetCode

Subtree of Another Tree - Tree - Easy - LeetCode

Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a sub

1 min7 Oct
Binary Tree Tilt - Tree - Easy - LeetCode

Binary Tree Tilt - Tree - Easy - LeetCode

Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference be

2 min7 Oct
Maximum Depth of N-ary Tree - Tree - Easy - LeetCode

Maximum Depth of N-ary Tree - Tree - Easy - LeetCode

Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the roo

1 min7 Oct
Diameter of Binary Tree - Tree - Easy - LeetCode

Diameter of Binary Tree - Tree - Easy - LeetCode

Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the le

1 min7 Oct
Minimum Absolute Difference in BST - Tree - Easy - LeetCode

Minimum Absolute Difference in BST - Tree - Easy - LeetCode

Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two node

1 min7 Oct
Find Mode in Binary Search Tree - Tree - Easy - LeetCode

Find Mode in Binary Search Tree - Tree - Easy - LeetCode

Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the giv

1 min7 Oct
Sum of Left Leaves - Tree - Easy - LeetCode

Sum of Left Leaves - Tree - Easy - LeetCode

Find the sum of all left leaves in a given binary tree. Example:     3   / \  9  20 

1 min6 Oct
Binary Tree Paths - Tree - Easy - LeetCode

Binary Tree Paths - Tree - Easy - LeetCode

Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input:   &nbs

1 min6 Oct
Path Sum - Tree - Easy - LeetCode

Path Sum - Tree - Easy - LeetCode

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along th

1 min6 Oct
Minimum Depth of Binary Tree - Tree - Easy - LeetCode

Minimum Depth of Binary Tree - Tree - Easy - LeetCode

Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the r

1 min6 Oct
Balanced Binary Tree - Tree - Easy - LeetCode

Balanced Binary Tree - Tree - Easy - LeetCode

Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as:

1 min6 Oct
Convert Sorted Array to Binary Search Tree - Tree - Easy - LeetCode

Convert Sorted Array to Binary Search Tree - Tree - Easy - LeetCode

Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a he

1 min6 Oct
Binary Tree Level Order Traversal II - Tree - Easy - LeetCode

Binary Tree Level Order Traversal II - Tree - Easy - LeetCode

Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by

1 min6 Oct