Mar 7, 2026
We can “shift” a string by shifting each character to its successive character (with z wrapping to a). For example, "abc" can be shifted to "bcd", …, "xyz", "yza", "zab"....
leetcodemediumstringhash
Mar 7, 2026
Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine. Each letter in magazine can only be used once.
leetcodeeasystringhash
Mar 7, 2026
Given two strings s and t, return true if t is an anagram of s, and false otherwise. An anagram uses the exact same characters with the exact same frequencies....
leetcodeeasystringhash
Mar 7, 2026
Given an integer array nums and an integer k, return true if there are two distinct indices i and j such that nums[i] == nums[j] and abs(i - j) <=...
leetcodeeasyarrayhashsliding-window
Mar 7, 2026
Given an integer array nums, return true if any value appears at least twice, and false if every element is distinct.
leetcodeeasyarrayhash
Mar 6, 2026
Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths where the sum of the node values equals targetSum. Each path should be returned as...
leetcodemediumtreedfsbacktracking
Mar 6, 2026
Given the root of a binary tree, return the inorder traversal of its nodes’ values. Inorder visits: left → root → right.
leetcodeeasytreedfs
Mar 6, 2026
Given the root of a binary tree, return the length of the diameter of the tree. The diameter is the length of the longest path between any two nodes (measured...
leetcodeeasytreedfs
Mar 6, 2026
Given the root of a binary tree, return the postorder traversal of its nodes’ values. Postorder visits: left → right → root.
leetcodeeasytreedfs
Mar 6, 2026
Given the root of a binary tree, return the preorder traversal of its nodes’ values. Preorder visits: root → left → right.
leetcodeeasytreedfs