PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/Other

Find two numbers that sum to target

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's competency in array manipulation, index reasoning, and efficient algorithmic techniques for pair-sum problems. It is commonly asked in technical interviews to measure problem-solving ability, understanding of algorithmic complexity, and practical implementation skills within the Coding & Algorithms domain, focusing on practical application rather than purely conceptual theory.

  • easy
  • Other
  • Coding & Algorithms
  • Data Scientist

Find two numbers that sum to target

Company: Other

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: easy

Interview Round: Technical Screen

## Problem You are given an integer array `nums` (length `n`) and an integer `target`. Return the indices `(i, j)` such that: - `i != j` - `nums[i] + nums[j] == target` Assume: - Exactly one valid pair exists. - You may return the indices in any order. ## Example - Input: `nums = [2, 7, 11, 15]`, `target = 9` - Output: `(0, 1)`

Quick Answer: This question evaluates a candidate's competency in array manipulation, index reasoning, and efficient algorithmic techniques for pair-sum problems. It is commonly asked in technical interviews to measure problem-solving ability, understanding of algorithmic complexity, and practical implementation skills within the Coding & Algorithms domain, focusing on practical application rather than purely conceptual theory.

Related Interview Questions

  • Implement a multi-button click detector - Other (hard)
  • Compute total after discounting most expensive item - Other (medium)
  • Return the k-th row of Pascal-like triangle - Other (medium)
  • Implement multiplication without using the multiplication operator - Other (Medium)
  • Prove reservoir sampling correctness - Other (Medium)
Other logo
Other
Sep 28, 2025, 12:00 AM
Data Scientist
Technical Screen
Coding & Algorithms
2
0

Problem

You are given an integer array nums (length n) and an integer target.

Return the indices (i, j) such that:

  • i != j
  • nums[i] + nums[j] == target

Assume:

  • Exactly one valid pair exists.
  • You may return the indices in any order.

Example

  • Input: nums = [2, 7, 11, 15] , target = 9
  • Output: (0, 1)

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Other•More Data Scientist•Other Data Scientist•Other Coding & Algorithms•Data Scientist 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.