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…
Browsing: Expert
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…
Given the heads of two singly linked-lists headA and headB, return the node at which the two lists intersect. If the two linked lists…
Given the head of a linked list, return the list after sorting it in ascending order. Here’s the [Problem Link] to begin with. Example…
The “Median of Two Sorted Arrays” problem is a classic and tricky coding interview question. It tests your understanding of…
The “Minimize Max Distance to Gas Station” problem is a classic example of using binary search on real numbers (floating…