PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Peregrine

Fetch, group, and print paginated activities

Last updated: Mar 29, 2026

Quick Overview

This question evaluates the ability to consume paginated APIs, aggregate and transform results (including mapping user IDs to user names), design a simple domain class for grouping, and implement grouping logic by type and name, testing skills in API interaction, data modeling, and data processing within the Coding & Algorithms domain.

  • Medium
  • Peregrine
  • Coding & Algorithms
  • Software Engineer

Fetch, group, and print paginated activities

Company: Peregrine

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

##### Question Given a paginated API that returns (totalCount, activities[]) for a requested page, implement code that iterates through all pages and prints every activity. After fetching all activities, group them into clumps where each clump contains activities sharing the same type and name. Implement a Clump class with attributes: activities list, type, and name, and return the clumps. Update the output so each activity shows the user’s name (retrieved from a separate getUserName(userId) API) instead of the user ID.

Quick Answer: This question evaluates the ability to consume paginated APIs, aggregate and transform results (including mapping user IDs to user names), design a simple domain class for grouping, and implement grouping logic by type and name, testing skills in API interaction, data modeling, and data processing within the Coding & Algorithms domain.

Peregrine logo
Peregrine
Aug 4, 2025, 10:55 AM
Software Engineer
Technical Screen
Coding & Algorithms
7
0
Question

Given a paginated API that returns (totalCount, activities[]) for a requested page, implement code that iterates through all pages and prints every activity. After fetching all activities, group them into clumps where each clump contains activities sharing the same type and name. Implement a Clump class with attributes: activities list, type, and name, and return the clumps. Update the output so each activity shows the user’s name (retrieved from a separate getUserName(userId) API) instead of the user ID.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Peregrine•More Software Engineer•Peregrine Software Engineer•Peregrine Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.