FastPrepNotification Limit for Days in a Row
Problems/Notification Limit for Days in a Row

Notification Limit for Days in a Row

WhatNot logoWhatNot● EasyNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Whatnot new grad technical interview as the first of two coding questions. The task was a per-service notification limiter that caps how many consecutive days a service can send, checked one call at a time. The candidate was also asked to test their code.

The report does not say whether a refused day breaks the streak. Here, only days on which the service really sent something count, so a fully refused day ends the streak. You get all the calls as two arrays and return one answer per call.

Our version is about 85% the same as the reported question.

Given notification requests in the order they arrive and a limit k, return a boolean array answer where answer[i] is true if request i is sent and false if it is refused. Request i comes from the service services[i] on day days[i].

No service may send notifications on more than k days in a row. A request from a service on day d is refused if that service sent at least one notification on each of the k days from day d - k through day d - 1. Otherwise it is sent.

Only notifications that are actually sent count. A day on which a service sent nothing, including a day on which all of its requests were refused, breaks that service's streak. Each service is tracked on its own.

Note: a service can have several requests on the same day. They all get the same answer, because the rule only looks at earlier days.

Function

shouldSendNotifications(services: String[], days: int[], k: int) → boolean[]

Examples

Example 1

services = ["livestreams","livestreams","livestreams","livestreams","livestreams"]days = [1,2,3,4,5]k = 3return = [true,true,true,false,true]

"livestreams" sends on days 1, 2 and 3. Day 4 would make 4 days in a row, so it is refused. Nothing was sent on day 4, so day 5 starts a new streak.

Example 2

services = ["refunds","refunds","refunds","refunds"]days = [7,7,8,8]k = 1return = [true,true,false,false]

Both day 7 notifications are sent because day 7 is a streak of one day. Day 8 would make 2 days in a row, so both day 8 notifications are refused.

Example 3

services = ["livestreams","giveaways","livestreams","giveaways","livestreams","livestreams"]days = [1,1,2,3,3,4]k = 2return = [true,true,true,true,false,true]

Each service has its own streak. "giveaways" sent nothing on day 2, so day 3 starts a new streak for it. "livestreams" sent on days 1 and 2, so day 3 is refused, and day 4 starts over.

Constraints

  • 1 <= services.length <= 105
  • days.length == services.length
  • 1 <= services[i].length <= 20
  • services[i] consists of lowercase English letters.
  • 1 <= days[i] <= 109
  • days is sorted in non-decreasing order.
  • 1 <= k <= 105

More WhatNot Phone Screen questions

  • Adjacent Pair and Run RemovalPHONE SCREEN · Seen Nov 2026
  • Merge Sorted Squares of Two ArraysPHONE SCREEN · Seen Nov 2026
  • User Journey PathsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Knight Dialer SequencesPHONE SCREEN · Seen Oct 2026
  • Reachable Exits in an Obstacle GridPHONE SCREEN · Seen Oct 2026
  • Palindrome with One DeletionPHONE SCREEN · Seen Oct 2026
  • Search a 2D MatrixPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Attraction Route Without Reusing TrailsPHONE SCREEN · Seen Sep 2026
  • Earliest Car for Each PassengerPHONE SCREEN · Seen Sep 2026
  • Minimum Stores for a Shopping ListPHONE SCREEN · Seen Sep 2026

Similar questions at other companies

  • Count Distinct Underwriting PII ValuesAffirm · PHONE SCREEN · ONSITE INTERVIEWAffirm interview questions
  • Bounded IPv4 FilterAmazon · PHONE SCREEN
  • SimpleRDD Multiset IntersectionDatologyAI · PHONE SCREEN
  • Vehicle Maintenance Event ReadinessWaymo · PHONE SCREENWaymo interview questions
  • Summarize the Latest Event for Each DeviceOneTrust · PHONE SCREEN
  • Project JSON Fields into a Target FormatBooking.com · PHONE SCREEN
  • Employee Training StatusVanta · PHONE SCREEN
  • Select Object by Key ExtremeBridge · PHONE SCREENBridge interview questions
  • Group Names by DepartmentMastercard · PHONE SCREENMastercard interview questions
  • AI Role: Collection with Add and Remove OperationsApple · PHONE SCREENApple interview questions

Interview reports that mention this question

  • Whatnot SWE New Grad Second Technical Interview: 8 Experiences

WhatNot interview experiences

  • Whatnot interviews · October 2026
  • Whatnot Experienced SWE Phone Screen Questions: 2 Experiences
  • Whatnot SWE Interview Questions: 6 Experiences
All WhatNot interview questionsSee WhatNot hiring insights
Saved
class Solution {
    public boolean[] shouldSendNotifications(String[] services, int[] days, int k) {
        // write your code here
    }
}
Checking account…