Frontend School

Dynamic Talent Pool Explorer with Advanced Filtering and Sorting

Machine Coding
hard

Dynamic Talent Pool Explorer with Advanced Filtering and Sorting

Hard
Data Table
Sorting
Filtering
React
TypeScript
UI

Overview

Imagine you're contributing to a core feature within LinkedIn's Recruiter product. Recruiters frequently manage large talent pools and need efficient tools to identify relevant candidates quickly. This problem challenges you to build a dynamic, interactive table component that allows recruiters to explore candidate profiles through advanced client-side sorting and filtering. This capability is critical for optimizing recruiter workflows, enabling faster candidate discovery, and ultimately accelerating the hiring process.

What you need to do / Task

Your task is to implement a TalentPoolExplorer component that displays a list of candidate profiles, enabling users to efficiently sort and filter the data.

  1. Display Candidate Data: Render a table that clearly displays the provided mock candidate data, showing Name, Title, Company, Experience (Years), Skills, Status, and Last Active.
  2. Sortable Columns: Implement client-side sorting for the Name, Experience (Years), Status, and Last Active columns. Clicking a column header should cycle through three states: ascending order, descending order, and no sorting (default/original order). A visual indicator (e.g., an arrow icon) should reflect the current sort direction.
  3. Dynamic Filtering: Implement the following client-side filter controls above the table:
    • Text Search: A global search input that filters candidates whose Name or Skills (case-insensitive) contain the search term.
    • Multi-select Status Filter: A set of checkboxes or a multi-select dropdown to filter candidates by their Status (e.g., 'Active', 'Interviewing', 'Offer Extended'). Users should be able to select multiple statuses.
    • Experience Range Filter: Two numeric input fields (Min, Max) to filter candidates by their Experience (Years) within a specified inclusive range.
  4. Combined Logic: All filters and sorting should work synergistically. Applying a filter should update the visible data, and then sorting should apply to the currently filtered dataset. Changing the sort order should re-sort the currently filtered data.
  5. Clear Filters & Sort: Provide a button that, when clicked, resets all active filters and clears any applied sorting, returning the table to its initial, unfiltered, and unsorted state.

UI/UX expectations

  • The table should have clear headers for each column.
  • Sortable columns must visually indicate their current sort direction (e.g., an up/down arrow next to the column name).
  • Filter controls should be intuitively placed above the table, each with a clear label.
  • The layout should be reasonably organized and usable, without needing extensive custom styling beyond basic table and form element presentation.
  • Use semantic HTML elements (e.g., <table>, <thead>, <tbody>, <th>, <td>, <label>, <input>) for basic accessibility.

Acceptance criteria

  • The table renders all mock candidate data correctly upon initial load.
  • Clicking a sortable column header cycles through ascending, descending, and default (no sort) order.
  • The global text search correctly filters candidates by matching substrings in their name or skills (case-insensitive).
  • The multi-select status filter correctly displays only candidates with the selected statuses.
  • The experience range filter accurately shows candidates whose experienceYears fall within the specified (inclusive) min and max values.
  • All filters and sorting mechanisms function correctly when applied simultaneously.
  • The "Clear Filters & Sort" button successfully resets all filter inputs and returns the table to its initial unsorted state.
  • No console errors or warnings are present during normal operation.

Constraints

Constraints & assumptions

  • Client-side Data Processing: All filtering and sorting operations must be performed client-side using the provided mock data. No backend API calls are required or expected.
  • Data Volume: The solution should handle up to 100-200 candidate records. While performance for extremely large datasets is not the primary focus, avoid overtly inefficient algorithms.
  • Technology Stack: The solution must be implemented using React with TypeScript.
  • Styling: Basic CSS for layout and presentation is sufficient. You are not expected to use any UI component libraries (e.g., Material UI, Ant Design) unless you opt to include them and manage their setup within the time limit.
  • Focus: The primary focus is on functionality, state management, and clean code.

Out of scope

  • Pagination or infinite scrolling.
  • Persisting filter/sort states (e.g., via URL parameters or local storage).
  • Server-side filtering, sorting, or complex database queries.
  • Complex animations, custom UI components (unless directly required for core functionality), or advanced accessibility features beyond semantic HTML.
  • Robust error handling for invalid user inputs (e.g., non-numeric input for experience range).

What interviewers evaluate

  • Problem Decomposition & Data Modeling: How effectively the candidate structures the data, manages application state, and derives computed values (filtered/sorted data).
  • Algorithmic Efficiency: The correctness and reasonable efficiency of the sorting and filtering logic, especially when combined.
  • React Proficiency & State Management: Effective use of React hooks (useState, useMemo), component composition, and handling state updates in a predictable manner.
  • Code Quality & Readability: Clean, well-organized, and maintainable code with appropriate TypeScript types, demonstrating attention to detail and best practices.

Loading editor...