Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a component that finds all subsets of a hardcoded array and displays them.

Hard

Problem Statement

Write a component that finds all subsets of a hardcoded array and displays them.

Sample Input

[1, 2, 3]

Sample Output

Subsets: [[], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]]

Limits

Time: 2s · Memory: 256 MB

Code Editor

Try your code in this preview. Submit marks it done.

import React from "react";
 
 const FindSubsets = () => {
  return (
  <div>
  {/* Display all subsets */}
  </div>
  );
 };
 
 export default FindSubsets;