PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/Meta

Solve four algorithmic library problems

Last updated: Mar 29, 2026

Quick Overview

These tasks evaluate algorithmic problem-solving, data structure design, stateful system validation, and string-processing correctness by combining an optimization selection problem, a mutable location-management ADT, chronological event-log validation, and constrained anagram checking.

  • Medium
  • Meta
  • Coding & Algorithms
  • Data Engineer

Solve four algorithmic library problems

Company: Meta

Role: Data Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Solve the following coding tasks: 1) Maximum Points from Different Categories: Given an array of items (category, points) and an integer k, choose exactly k items with all categories distinct to maximize the total points. Return the maximum achievable sum. 2) Library Location Management: Design a data structure to manage book locations in a library. Support add(book_id, location), move(book_id, new_location), remove(book_id), and get_location(book_id) in efficient time, where location may include branch, aisle, shelf, and position. 3) Book Checkout Log Validation: Given a chronological list of events (timestamp, book_id, member_id, action in {checkout, return, renew}), validate the log. A book cannot be held by multiple members simultaneously; returns must follow a checkout; renewals only by the current holder; and timestamps for the same book must be non-decreasing. Return a boolean and, if invalid, the index of the first violating event. 4) Two String Validation (no Counter): Given two lowercase strings s and t, determine whether they are anagrams of each other using only basic data structures (e.g., arrays or dicts) and without using collections.Counter. Return true or false.

Quick Answer: These tasks evaluate algorithmic problem-solving, data structure design, stateful system validation, and string-processing correctness by combining an optimization selection problem, a mutable location-management ADT, chronological event-log validation, and constrained anagram checking.

Related Interview Questions

  • Solve Tree Columns And Maze Variants - Meta (medium)
  • Solve a Key-Door Corridor Maze - Meta (medium)
  • Solve Array Merge and Parentheses Cleanup - Meta (medium)
  • Solve Two Backtracking Array Problems - Meta (hard)
  • Solve Maze and Suffix Problems - Meta (medium)
Meta logo
Meta
Aug 13, 2025, 12:00 AM
Data Engineer
Technical Screen
Coding & Algorithms
7
0

Solve the following coding tasks:

  1. Maximum Points from Different Categories: Given an array of items (category, points) and an integer k, choose exactly k items with all categories distinct to maximize the total points. Return the maximum achievable sum.
  2. Library Location Management: Design a data structure to manage book locations in a library. Support add(book_id, location), move(book_id, new_location), remove(book_id), and get_location(book_id) in efficient time, where location may include branch, aisle, shelf, and position.
  3. Book Checkout Log Validation: Given a chronological list of events (timestamp, book_id, member_id, action in {checkout, return, renew}), validate the log. A book cannot be held by multiple members simultaneously; returns must follow a checkout; renewals only by the current holder; and timestamps for the same book must be non-decreasing. Return a boolean and, if invalid, the index of the first violating event.
  4. Two String Validation (no Counter): Given two lowercase strings s and t, determine whether they are anagrams of each other using only basic data structures (e.g., arrays or dicts) and without using collections.Counter. Return true or false.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Meta•More Data Engineer•Meta Data Engineer•Meta Coding & Algorithms•Data Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ 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.