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

Programming Exercises

Create a component that allows users to add and remove tags dynamically.

Medium

Problem Statement

Create a component that allows users to add and remove tags dynamically.

Sample Input

Initial tags: ["React", "JavaScript"]

Sample Output

Users can add a new tag or remove an existing one by clicking a delete button next to it.

Limits

Time: 2s · Memory: 256 MB

Code Editor

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

import React, { useState } from "react";
 
 const TagManager = () => {
  return (
  <div>
  <ul>
  {/* Render tags */}
  </ul>
  <input type="text" />
  <button>Add Tag</button>
  </div>
  );
 };
 
 export default TagManager;