PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/Adobe

Determine if a multiple-sum subarray exists

Last updated: Apr 10, 2026

Quick Overview

This question evaluates understanding of modular arithmetic, contiguous subarray sums, and streaming-aware algorithm design, measuring competency in array processing, remainder reasoning, and handling edge cases such as k = 0.

  • Medium
  • Adobe
  • Coding & Algorithms
  • Machine Learning Engineer

Determine if a multiple-sum subarray exists

Company: Adobe

Role: Machine Learning Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

Given an integer array nums and an integer k, determine whether there exists a contiguous subarray of length at least 2 whose sum is divisible by k; return true if such a subarray exists, otherwise false. If k = 0, interpret the requirement as finding a length ≥2 subarray with sum exactly 0. Explain your approach and analyze time and space complexity. Follow-up: how would you adapt your solution to a streaming setting where nums arrives incrementally?

Quick Answer: This question evaluates understanding of modular arithmetic, contiguous subarray sums, and streaming-aware algorithm design, measuring competency in array processing, remainder reasoning, and handling edge cases such as k = 0.

Related Interview Questions

  • Traverse a path and print directory tree - Adobe (medium)
  • Build a React team builder with role constraints - Adobe (medium)
  • Implement K-means clustering from scratch - Adobe (medium)
  • Design a nested-list iterator - Adobe (Medium)
  • Maximize pay by flipping k rest days - Adobe (Medium)
Adobe logo
Adobe
Aug 9, 2025, 12:00 AM
Machine Learning Engineer
Onsite
Coding & Algorithms
11
0

Given an integer array nums and an integer k, determine whether there exists a contiguous subarray of length at least 2 whose sum is divisible by k; return true if such a subarray exists, otherwise false. If k = 0, interpret the requirement as finding a length ≥2 subarray with sum exactly 0. Explain your approach and analyze time and space complexity. Follow-up: how would you adapt your solution to a streaming setting where nums arrives incrementally?

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Adobe•More Machine Learning Engineer•Adobe Machine Learning Engineer•Adobe Coding & Algorithms•Machine Learning 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.