Case studies

70 case studies available

Browse by topic

FundamentalPensée critique

Apply a travel expense policy to four claims

Context: You work in the finance team of an engineering consultancy. The travel policy states: "Business-class flights are reimbursed only if the flight lasts more than six hours. Hotel costs above 150 euros per night are reimbursed if the stay was approved by a director in advance. Taxi costs are reimbursed unless a company shuttle was available." Problem: Four claims arrive. Ana flew business class on a five-hour flight. Ben stayed in a 180-euro hotel, approved by his director after the trip. Chloe took a taxi to the airport at 5 am; the shuttle starts at 7 am. Dev flew business class on a nine-hour flight and stayed in a 140-euro hotel without approval. A colleague says Ben's hotel should be paid because "the policy only lists one way to get reimbursed, it doesn't forbid others". Constraints: You must apply the policy as written. Each decision must be explainable to the employee in one or two sentences. Disputed cases go to the finance director, who expects a clear reading of the text. Expected deliverable: Answer in 3 points: 1) your decision for each claim, with the rule that supports it; 2) your view on the colleague's argument about Ben's hotel; 3) a rewording of the hotel rule that would remove the dispute.

logicdeductionfinance+1
FundamentalPensée critique

Assess the evidence in a vendor's customer case study

Context: You are a procurement manager at an insurance company. Your claims team is considering a document-processing tool, and the vendor has sent a case study about one of its clients. Problem: The case study says: "After adopting our tool, Northgate Mutual cut claim processing time by 40%." It shows average processing times of 10 days before and 6 days after. The text also mentions that Northgate hired 12 additional claims handlers during the same quarter and simplified its claim forms. The vendor chose which client to feature. Your claims director says the case study "proves the tool works". Constraints: You meet the vendor in two days for 30 minutes. You cannot contact Northgate without the vendor's agreement. The decision will be taken by the claims director and the finance director. Expected deliverable: Present your analysis in 3 points: 1) what the case study shows and what it does not show; 2) the questions you will put to the vendor; 3) what evidence you would accept as convincing before recommending the tool.

evidenceprocurementsources+1
FundamentalPensée critique

Review a claim that a new shift pattern cut staff absences

Context: You are an operations analyst at a food processing plant with 350 staff. In May, the plant manager introduced a new shift pattern on two of its four production lines. He now wants to roll it out to all lines in October. Problem: His summary reads: "Absence on lines 1 and 2 fell from 6.1% in April to 4.2% in June and July. The new shifts work." Last year, absence across the plant was 5.9% in April and 4.4% in June and July. Lines 3 and 4, which kept the old pattern, recorded 4.6% in June and July this year. Lines 1 and 2 also received new rest-room facilities in May. Constraints: The manager presents to the board next Tuesday. No new data will be collected before then. Your answer must fit on one page and be readable by non-specialists. Expected deliverable: Answer in 4 points: 1) what the figures allow you to say; 2) what they do not allow you to say, and why; 3) what information you would ask for before October; 4) your advice on the rollout.

data analysisoperationsHR+1
AdvancedPensée critique

Advise on a hiring test that is said to predict performance

Context: You are a talent acquisition lead at a logistics company that hires about 200 warehouse supervisors a year. A consultant has sold the company an online reasoning test and recommends rejecting candidates who score below 60 out of 100. Problem: The consultant's report says: "Among the 40 supervisors hired last year who took the test, those scoring above 80 had better first-year ratings than those scoring 60 to 80." Only candidates scoring above 60 were hired. First-year ratings are given by line managers, who could see test scores. The HR director wants to raise the cut-off to 70 to "hire only the best". Constraints: Hiring for the peak season starts in six weeks. The company already struggles to fill supervisor roles in two regions. Any change to the cut-off must be explainable to candidates who ask why they were rejected. Expected deliverable: Present your advice in 5 points: 1) what the consultant's finding shows; 2) its limits as evidence for the cut-off; 3) the risks of raising the cut-off to 70; 4) how the company could test the value of the test over the coming year; 5) your recommendation for the peak-season hiring.

recruitmentstatisticsevidence+1
AdvancedPensée critique

Challenge a project timeline estimate before a client commitment

Context: You are a project management officer at a software services firm. A client wants a new booking system, and the account manager must give a delivery date in a meeting on Friday. Problem: The project team estimates eight weeks, broken down task by task. The team is confident: "We know this kind of system well." Over the past three years, the firm delivered five similar booking systems. They were estimated at seven to nine weeks and took between 12 and 16 weeks. The account manager wants to quote eight weeks to win the contract against a competitor who has promised ten. Constraints: The contract includes a penalty of 1,500 euros per week of delay. The team cannot start before the 1st of next month. The account manager has the final say on the quote. You have one hour with the team before Friday. Expected deliverable: Present your approach in 4 points: 1) what the team's estimate and the past projects each tell you; 2) how you would use your hour with the team; 3) the date or range you would advise the account manager to quote, with the risk in euros; 4) what you would put in place so that future estimates improve.

project managementestimationdecision-making+1
AdvancedPensée critique

Evaluate a plan to rank sales staff by total revenue

Context: You are an HR business partner at a medical equipment distributor with 24 sales representatives. The sales director wants to publish a monthly ranking of reps by total revenue and pay a bonus to the top five. Problem: The reps cover very different territories: some serve large city hospitals, others rural clinics. Six reps joined less than a year ago and inherited territories with few existing clients. Two reps handle a single national account worth a quarter of company revenue. Last year's top five were all city reps with more than five years in the company. The sales director says: "Revenue is the only fair measure. Numbers don't lie." Constraints: The scheme must start next quarter. Payroll can only handle one bonus calculation per month. The sales director must remain the owner of the scheme. Any measure used must come from data already in the CRM. Expected deliverable: Present your response in 4 points: 1) what a revenue ranking would measure in this company; 2) the risks of the proposed scheme, including effects on behaviour; 3) an alternative measure or design that uses existing data; 4) how you would present your view to the sales director.

metricssales managementfairness+1
AdvancedPensée critique

Investigate a sharp rise in a customer satisfaction score

Context: You are a customer insight analyst at a regional energy supplier. In March, the company replaced its email satisfaction survey with a short text message sent right after a call to customer service ends. Problem: The average satisfaction score rose from 6.8 to 8.1 out of 10 between the first and second quarter. The response rate rose from 4% to 19%. Formal complaints to the energy ombudsman stayed at the same level. The customer service director wants to announce the improvement in the annual report and credit her team's new training programme, which started in February. Constraints: The annual report text must be submitted in three weeks. You cannot run a parallel email survey before then. The board is sensitive to claims that could later be challenged by the regulator. Expected deliverable: Answer in 4 points: 1) the possible explanations for the rise in the score; 2) the evidence in the scenario that supports or weakens each; 3) the checks you can carry out within three weeks; 4) the wording you would recommend for the annual report.

surveyscustomer experiencemeasurement+1
ExpertPensée critique

Critique a board paper that argues for an acquisition

Context: You are a non-executive director at a mid-sized logistics group. The chief executive has circulated a board paper recommending the purchase of a regional courier firm for 40 million euros. The board votes next week. Problem: The paper argues: "We have already spent 3 million euros on due diligence, so walking away would waste that money. Synergies of 8 million euros a year are expected, based on the best year of each business. Our acquisition of a parcel firm in 2021 was a great success, so this one will be too. The courier's founder, a respected figure, assures us the business is growing. Competitors are making acquisitions; if we don't act, we will fall behind." The paper does not include the courier's accounts for the last two years. Constraints: You have 15 minutes to speak at the board meeting. The chief executive is a strong advocate and has a good track record. You cannot commission new analysis before the vote, but you can ask for documents. Expected deliverable: Present your critique in 5 points: 1) each argument in the paper and how much weight it can bear; 2) the information that is missing; 3) the questions you will ask at the meeting, in order of priority; 4) the conditions under which you would vote in favour; 5) how you will raise your concerns without undermining the chief executive.

argument evaluationstrategyfinance+2
ExpertPensée critique

Decide whether to roll out a store layout pilot across the chain

Context: You are head of strategy at a home goods retailer with 60 stores. A new store layout was piloted for three months in eight stores, and the operations director wants approval to roll it out everywhere at a cost of 90,000 euros per store. Problem: In the pilot stores, sales rose 9% compared with the same three months last year. Across the other 52 stores, sales rose 3%. The pilot stores were chosen by regional managers, who picked "stores with strong teams that would make the pilot work". Staff in the pilot stores knew they were being watched and received extra training. Two pilot stores are in shopping centres that opened new car parks during the pilot. Constraints: The board meets in four weeks. The budget for the year allows up to 20 stores to be refitted. Refitting a store closes it for one week. The operations director has publicly backed the layout and the regional managers are keen. Expected deliverable: Present your analysis in 5 points: 1) what the pilot results show; 2) how far the 6-point gap can be expected to hold across the chain; 3) the decision you would recommend to the board for this year; 4) how you would design the next stage so that its results are more reliable; 5) how you would handle the operations director and regional managers.

retailexperiment designdecision-making+2
ExpertPensée critique

Reconcile two conflicting figures before a regulator deadline

Context: You are a reporting manager at a consumer credit company. Each quarter, the company must report to the financial regulator the number of customers more than 90 days late on payments. The report is due in 48 hours. Problem: The risk team's report shows 4,210 customers more than 90 days late. The collections team's report shows 3,650. The risk report counts from the payment due date; the collections report counts from the date the first reminder letter is sent, usually 10 days later. The risk report includes customers who have agreed a repayment plan; collections excludes them. Last quarter, the company reported the collections figure. The chief financial officer asks you which number is "right". Constraints: The regulator's guidance defines lateness from the contractual due date and says nothing about repayment plans. The report cannot be submitted late. Any change from last quarter's method must be explained to the regulator. You can work with both teams for one day. Expected deliverable: Present your approach in 5 points: 1) the reasons for the gap between the two figures; 2) which figure, or which corrected figure, you would report, and why; 3) what you would check with each team during your day; 4) how you would handle the difference with last quarter's report; 5) what you would change so this does not happen again.

data qualitycompliancereporting+1
FundamentalReact

Applying dynamic styles and className in React

Context A status badge component must change its background color depending on the status value (success, warning, error). The Problem The team is using inline style objects with hard-coded color strings, making theming and maintenance difficult. Constraints Use a mapping object to associate each status to a CSS class name. Apply the class dynamically via className. Do not use inline styles. Expected Deliverable A React component that applies dynamic CSS class names based on a prop value using a mapping object, without relying on inline styles.

reactclassnamedynamic-styles+2
FundamentalReact

Composing components with children prop

Context A UI library needs a generic Card wrapper component that can wrap any content passed to it. The Problem The current Card component only accepts a title prop and hard-codes its inner content, making it impossible to reuse with different layouts. Constraints Use the children prop to render arbitrary nested content. Apply consistent wrapper styles (border, padding, shadow) in the Card. Demonstrate usage with at least two different inner contents. Expected Deliverable A React Card component using the children prop as a flexible content slot, demonstrating composition with different inner elements.

reactchildrencomposition+2
FundamentalReact

Conditional rendering based on state

Context A UI component must display different content depending on whether a user is logged in. The Problem The team is duplicating entire component trees and toggling CSS classes via JavaScript, rather than using React's conditional rendering patterns. Constraints Use a boolean state variable isLoggedIn. Render a welcome message when true, and a login prompt when false. Toggle the state with a button click. Expected Deliverable A React component demonstrating conditional rendering using a ternary operator or short-circuit evaluation based on a state variable.

reactconditional-renderingusestate+2
FundamentalReact

Creating your first React component

Context A development team is migrating a static HTML page to a React application. The Problem The current page contains a product card written in plain HTML with no reusability. Every time a new product needs to be displayed, the HTML is duplicated manually. Current Code <div class="card"> <h2>Product Name</h2> <p>$29.99</p> <button>Add to cart</button> </div> Constraints Create a functional component named ProductCard. Accept name and price as props. Render the card structure using JSX. Expected Deliverable A React functional component that renders a product card from props and can be reused across the application.

reactcomponentsprops+2
FundamentalReact

Fetching data with useEffect and displaying it

Context A team wants to display a list of users fetched from a public API on component mount. The Problem The data fetch is currently triggered on a button click inside an event handler, causing data to not appear on initial load. Constraints Use useEffect with an empty dependency array to fetch data on mount. Store the result in state with useState. Display a loading indicator while fetching. Expected Deliverable A React component that fetches data from a REST API on mount using useEffect, manages loading state, and renders the results.

reactuseeffectfetch+2
FundamentalReact

Handling form input with controlled components

Context A registration form needs to capture a user's name and email before submission. The Problem The form currently reads values directly from the DOM using document.getElementById, bypassing React's state management. Constraints Convert each input into a controlled component using useState. Bind the value and onChange props correctly. Log the form data on submit without reloading the page. Expected Deliverable A React form component using controlled inputs, with state-bound values and a submit handler that prevents default browser behavior.

reactformscontrolled-components+2
FundamentalReact

Lifting state up between sibling components

Context Two sibling components — a temperature input and a unit selector — need to stay in sync with each other. The Problem Each component manages its own local state independently, so changing the unit in one component does not update the displayed value in the other. Constraints Move the shared state to the closest common parent. Pass state and setter functions down as props. Do not use any global state library. Expected Deliverable A React implementation of the state lifting pattern, where a parent component coordinates state between two sibling components through props.

reactstate-liftingsibling-components+2
FundamentalReact

Managing local state with useState

Context A UI team is building a simple counter widget for a dashboard. The Problem The counter is currently implemented with vanilla JavaScript using direct DOM manipulation, which conflicts with React's rendering model. Current Code let count = 0; document.getElementById('btn').onclick = () => { count++; document.getElementById('display').innerText = count; }; Constraints Rewrite the counter as a React component using useState. Provide increment and decrement buttons. Display the current count value. Expected Deliverable A React component managing a numeric counter with useState, increment and decrement controls, and proper re-rendering on state change.

reactusestatestate+2
FundamentalReact

Passing functions as props to child components

Context A parent component manages a shopping cart, and a child component displays individual items with a remove button. The Problem The child component has no way to notify the parent when an item should be removed, so the remove button currently has no effect. Constraints Define the removeItem handler in the parent component. Pass it as a prop to the child component. Call the function from the child's button onClick. Expected Deliverable A React parent-child component pair demonstrating upward communication via callback props, correctly updating parent state from a child action.

reactpropscallbacks+2
FundamentalReact

Rendering a list of items with map()

Context An e-commerce application needs to display a list of products fetched from an API. The Problem The team is manually writing JSX for each product, making the code unmaintainable as the product catalog grows. Constraints Use the Array.map() method to render a list of product items. Assign a unique key prop to each element. Extract a reusable ListItem component. Expected Deliverable A React component that dynamically renders a list of items from an array using map(), with proper key props and a reusable child component.

reactlistmap+2
AdvancedReact

Building a custom hook for async data fetching

Context Multiple pages in an application each implement their own fetch logic with loading and error states, resulting in significant code duplication. The Problem Every component repeats the same useEffect + useState pattern for data fetching, making it hard to maintain and test centrally. Constraints Extract the logic into a custom hook named useFetch. Return { data, loading, error } from the hook. Handle component unmounting to prevent state updates on unmounted components. Expected Deliverable A reusable useFetch custom hook encapsulating async fetching with loading and error states, and cleanup logic to avoid memory leaks.

reactcustom-hookusefetch+2
AdvancedReact

Building an accessible modal with focus trapping

Context A modal dialog component is used for critical confirmations, but keyboard navigation breaks when the modal opens — focus escapes to the background. The Problem The modal does not trap focus within itself, making it unusable for keyboard and screen reader users, failing WCAG 2.1 AA criteria. Constraints Use useRef and useEffect to trap Tab focus within the modal. Return focus to the trigger element on close. Handle the Escape key to close the modal. Expected Deliverable An accessible React modal component with focus trapping, Escape key handling, and focus restoration on close, compliant with WCAG keyboard navigation requirements.

reactaccessibilitymodal+2
AdvancedReact

Code splitting and lazy loading with React.lazy and Suspense

Context A single-page application bundles all routes into one large JavaScript file, resulting in a 3MB initial load. The Problem Users wait several seconds before the application becomes interactive because every page's code is downloaded upfront. Constraints Use React.lazy() to dynamically import route components. Wrap lazy components with Suspense and provide a loading fallback. Apply the pattern to at least three routes. Expected Deliverable A React Router setup using React.lazy and Suspense for route-level code splitting, reducing the initial bundle size with a visible loading fallback.

reactlazysuspense+2
AdvancedReact

Compound component pattern for a flexible Tabs UI

Context A design system requires a Tabs component that is flexible enough for teams to customize the tab list and panel layout independently. The Problem The current Tabs component accepts all configuration as a single complex props object, making it rigid and hard to extend with custom tab header styles. Constraints Implement the compound component pattern with Tabs, Tabs.List, Tabs.Tab, and Tabs.Panel sub-components. Share active tab state through context internally. Expose no required configuration props beyond children. Expected Deliverable A React Tabs implementation using the compound component pattern with implicit state sharing via context, providing a flexible and composable API.

reactcompound-componentscontext+2
AdvancedReact

Global state management with useContext and useReducer

Context An application has authentication state (user, token, role) that needs to be accessible across deeply nested components without prop drilling. The Problem The auth state is currently passed through 5 levels of component props, making every intermediate component unnecessarily coupled to auth logic. Constraints Create an AuthContext with useContext. Manage state transitions with useReducer (LOGIN, LOGOUT actions). Provide the context at the root level and consume it in leaf components. Expected Deliverable A React context + reducer architecture for authentication state, demonstrating clean separation between context provider, reducer logic, and consumer components.

reactusecontextusereducer+2
AdvancedReact

Implementing a debounced search input with useRef

Context A search input triggers an API call on every keystroke, flooding the backend with hundreds of requests per second. The Problem The onChange handler calls the API directly without any delay mechanism, causing performance and cost issues. Constraints Implement debouncing using useRef to hold the timer reference. Wait 400ms after the last keystroke before firing the API call. Cancel the pending timer on each new keystroke. Expected Deliverable A React search input component implementing debounce with useRef and useEffect, reducing API calls to fire only after the user stops typing.

reactuserefdebounce+2
AdvancedReact

Implementing infinite scroll with IntersectionObserver

Context A social feed loads 20 posts at a time and must automatically load the next page when the user scrolls near the bottom. The Problem The team is using a scroll event listener on the window to detect the bottom of the page, which fires hundreds of times per scroll and causes jank. Constraints Replace the scroll listener with an IntersectionObserver targeting a sentinel element at the list bottom. Manage the observer lifecycle inside a useEffect. Append new results to the existing list without replacing it. Expected Deliverable A React infinite scroll implementation using IntersectionObserver, with correct observer cleanup and accumulative page data management.

reactinfinite-scrollintersectionobserver+2
AdvancedReact

Implementing optimistic UI updates

Context A todo application updates a task's completion status by calling a REST API, but the UI only updates after the server responds, causing a noticeable delay. The Problem The current approach waits for the API response before updating the UI, resulting in a laggy experience even on reliable connections. Constraints Apply the state change immediately in the UI before the API call resolves. Revert the state to its previous value if the API call fails. Show an error notification on failure. Expected Deliverable A React component implementing optimistic UI updates with automatic rollback on API failure, demonstrating the pattern with a toggle action.

reactoptimistic-uiusestate+2
AdvancedReact

Optimizing re-renders with React.memo and useCallback

Context A large dashboard renders a list of 200 rows. Each row contains an action button tied to a callback defined in the parent. The Problem Every state change in the parent causes all 200 row components to re-render, even when their data has not changed, causing visible UI lag. Constraints Wrap the row component with React.memo to skip unnecessary re-renders. Stabilize the callback reference using useCallback with correct dependencies. Verify the optimization using React DevTools Profiler. Expected Deliverable A React implementation demonstrating React.memo and useCallback working together to prevent unnecessary child re-renders, with an explanation of the dependency array choices.

reactmemousecallback+2
AdvancedReact

Performance optimization using useMemo for expensive computations

Context A data grid component computes a filtered and sorted list of 10,000 records on every render, causing noticeable frame drops when unrelated state changes. The Problem The filtering and sorting logic runs synchronously on every render regardless of whether the source data or filter criteria have changed. Constraints Wrap the filtering and sorting computation in useMemo. Define the dependency array to include only the data array and the active filter. Measure the improvement with React DevTools Profiler. Expected Deliverable A React data grid component using useMemo to memoize expensive computations, with a clear explanation of the dependency array and measured performance impact.

reactusememoperformance+2

Browse by topic

3 topics. The arrow marks a topic that has its own page.

Original questions designed by CodeDuel. CodeDuel is not affiliated with any publisher or certification body mentioned; certification names and trademarks belong to their respective owners and are used only to indicate the area covered. Report content

    Case studies: hands-on professional scenarios – page 2 | CodeDuel