# Coding question: duplicate values in a contiguous window

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/4245/check-duplicate-values-contiguous-window
Source observed: 2026-11-05T01:46:10.458Z
Last checked: 2026-11-05T01:46:10.458+00:00
Indexed: 2026-11-06T20:55:30.867+00:00

---

# Write a function that takes an array of integers and checks for duplicate values in any contiguous window of size N.

We provide this coding-interview question for practice on Aced (formerly Exponent). The task is to determine whether an array contains duplicate values within any contiguous window of size **N**.

## Question details

- **Role:** [Machine Learning Engineer](https://www.aced.io/questions?role=ml-engineer)
- **Company:** [Meta](https://www.aced.io/questions?company=meta-facebook)
- **Category:** [Coding](https://www.aced.io/questions?type=coding)
- **Interview:** 1
- **Last asked:** 2 years ago

Detailed company statistics are available through [Upgrade](https://www.aced.io/upgrade?src=questions). You can [log in or sign up to answer](https://www.aced.io/signup?src=nav&returnPath=/questions/4245/check-duplicate-values-contiguous-window). Submitting marks this question complete.

## Community answers

No answers have been contributed by the community yet.

## Related questions

- [Determine if an array of integers from 1 to n contains a duplicate in constant time and space.](https://www.aced.io/questions/965/check-duplicates-in-array-constant-space)
- [Given an array of integers, find the first duplicate.](https://www.aced.io/questions/7443/find-first-duplicate-array-integers)

## Related courses

![Machine Learning Engineer Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/6UfkHxUyLQVfDHSfLNQtWa/1be1539a65b4f6f15201f5b573c0a578/ML_Engineer_Interview_Prep_Course.jpeg?w=800&h=800&fm=webp&q=75)

### [Machine Learning Engineer Interview Prep](https://www.aced.io/courses/ml-engineer)

Land your dream machine learning role at Meta, Google, Amazon, Apple, Microsoft, Nvidia, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates. Explore ML system design, core concepts, coding, behavioral interviews, and more.

![Behavioral Interviews: A Practical Guide for Engineers](https://images.ctfassets.net/x78yjrjc11pq/47qcoHjzFZXE37GoacedkB/9d8e3f4910d8b06b21e76745cd9cbff3/AdobeStock_1142146335.jpeg?w=800&h=800&fm=webp&q=75)

### [Behavioral Interviews: A Practical Guide for Engineers](https://www.aced.io/courses/eng-behavioral)

Get offers at the level you deserve. Prep for senior+ behavioral interviews at FAANG and Tier-1 companies. Made with staff and principal engineers from Meta, Netflix, Google, and more. Avoid downleveling, elevate past projects, and stop sounding like a robot.

## Browse our interview preparation

We offer courses and practice for Product Management, Forward Deployed Engineering, Engineering Management, Software Engineering, System Design, Data Science, Machine Learning, Data Engineering, AI Engineering, Investment Banking, Generative AI, Security Engineering, TPM, Solutions Architecture, UX / Product Design, and BizOps & Strategy. We also offer [Loops](https://www.aced.io/guides?src=nav), [Experiences](https://www.aced.io/experiences?src=nav), [Practice](https://www.aced.io/practice?src=nav), and [Coaching](https://www.aced.io/coaching?src=nav).

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4245%2Fcheck-duplicate-values-contiguous-window&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4245%2Fcheck-duplicate-values-contiguous-window). Opening a form does not execute a tool.