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…
Browsing: Hard
The problem “Binary Subarrays With Sum” asks to count the number of contiguous subarrays in a binary array nums whose sum equals a given goal.…
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…
Given an array arr[] containing non-negative integers, the task is to divide it into two sets set1 and set2 such that the absolute difference between their sums is…
You are given a rows x cols matrix grid representing a field of cherries where grid[i][j] represents the number of cherries that you can collect from…
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap…
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money…
The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. Given an…
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers…