Databricks SDE Interview Question 2022 March | Dynamic Programming: Partition Equal Subset Sum | On-campus

Question · Posted Jun 2026

Question 1: Partition Equal Subset Sum Problem Statement Given an integer array nums, return true if you can partition the array into two subsets such that the sum of elements in both subsets is equal. You must implement an algorithm that runs in pseudo-polynomial time and uses O(Sum) auxiliary space. Constraints 1 <= nums.length <= 200 1 <= nums[i] <= 100 Examples Example 1: Input: nums = [1, 5, 11, 5] Output: true Explanation 1: Total = 22, target = ...

The full answer & interview discussion are available to premium members.

Log in Create a free account