PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Squarepoint

Solve two coding assessment tasks

Last updated: Apr 16, 2026

Quick Overview

This question set evaluates algorithmic optimization and string-processing skills: the first problem focuses on maximizing cumulative revenue from limited inventories (optimization and greedy reasoning with dynamic value updates), while the second focuses on case-insensitive text parsing, word frequency counting, and frequency-based ordering.

  • hard
  • Squarepoint
  • Coding & Algorithms
  • Software Engineer

Solve two coding assessment tasks

Company: Squarepoint

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Take-home Project

The online assessment contained two coding problems: 1. **Maximize store revenue** You are given an integer array `quantity` of length `n`, where `quantity[i]` is the current inventory of product `i`. Selling one unit of product `i` earns revenue equal to its current inventory immediately before the sale. After the sale, `quantity[i]` decreases by 1. There are `m` customers, and each customer buys exactly one unit. Assume `0 <= m <= sum(quantity)`. Choose which product to sell to each customer so that the total revenue is maximized. Return the maximum possible revenue. 2. **Find top word frequencies** You are given a string `text`. Count how many times each word appears, treating uppercase and lowercase letters as the same. A word is defined as a maximal sequence of English letters, and any non-letter character should be treated as a separator. Return at most 3 distinct words, sorted by descending frequency. If two words have the same frequency, sort them in ascending alphabetical order. If the text contains fewer than 3 distinct words, return all of them.

Quick Answer: This question set evaluates algorithmic optimization and string-processing skills: the first problem focuses on maximizing cumulative revenue from limited inventories (optimization and greedy reasoning with dynamic value updates), while the second focuses on case-insensitive text parsing, word frequency counting, and frequency-based ordering.

Related Interview Questions

  • Implement EMA Crossovers and Root Solvers - Squarepoint (medium)
  • Parse payroll file and answer queries - Squarepoint (medium)
  • Maximize revenue from inventory sales - Squarepoint (medium)
  • Maximize profit from one or many stock trades - Squarepoint (hard)
Squarepoint logo
Squarepoint
Feb 23, 2026, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
3
0

The online assessment contained two coding problems:

  1. Maximize store revenue
    You are given an integer array quantity of length n , where quantity[i] is the current inventory of product i . Selling one unit of product i earns revenue equal to its current inventory immediately before the sale. After the sale, quantity[i] decreases by 1. There are m customers, and each customer buys exactly one unit. Assume 0 <= m <= sum(quantity) . Choose which product to sell to each customer so that the total revenue is maximized. Return the maximum possible revenue.
  2. Find top word frequencies
    You are given a string text . Count how many times each word appears, treating uppercase and lowercase letters as the same. A word is defined as a maximal sequence of English letters, and any non-letter character should be treated as a separator. Return at most 3 distinct words, sorted by descending frequency. If two words have the same frequency, sort them in ascending alphabetical order. If the text contains fewer than 3 distinct words, return all of them.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Squarepoint•More Software Engineer•Squarepoint Software Engineer•Squarepoint 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.