The Vertical Order Traversal of a Binary Tree problem asks us to traverse a binary tree in a special way:…
Browsing: Expert
You are given the root of a binary tree. Your task is to find the maximum path sum in the…
You are given an integer k and an array prices where prices[i] is the price of a stock on day…
You are given an array prices where prices[i] is the price of a stock on day i. You are allowed…
Given a string s, return the minimum number of insertions needed to make s a palindrome. You can insert characters…
Given two strings text1 and text2, the goal is to print one actual Longest Common Subsequence (LCS), not just its…
You are given an integer array ratings representing the rating of each child standing in a line. You must give…
The problem “Count Number of Nice Subarrays” asks: given an integer array nums and an integer k, count the number of contiguous subarrays that contain exactly k odd…
Given string num representing a non-negative integer num, and an integer k, return the smallest possible integer after removing k digits from num. Here’s the [Problem…
Given n items, each with a specific weight and value, and a knapsack with a capacity of W, the task is to put the items in…