Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a program to find all pairs in a hardcoded array that sum up to a hardcoded target.

Medium

Problem Statement

Create a program to find all pairs in a hardcoded array that sum up to a hardcoded target.

Sample Input

Array: [1, 2, 3, 4, 5], Target: 6

Sample Output

Pairs: [1, 5] [2, 4] 

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
using System; class FindPairs { static void Main() { // Find all pairs that sum to the target } }
Log in or sign up to run or submit your code.Log inSign up
Input
Array: [1, 2, 3, 4, 5], Target: 6
Expected Output
Pairs: [1, 5] [2, 4]