Interview Questions
Interview Guides
Experiences
Explore
Get started
Sign in
Interview Guides
Two-Sum Equals K in O(n) | Dataford Interview Questions
All questions
/
Coding
Two-Sum Equals K in O(n)
Medium
Asked at 1 company
Hash Tables
Arrays
Problem
Given an array, how would you determine whether the sum of two elements equals k in O(n) time?
Question
Answer
Problem
Given an array, how would you determine whether the sum of two elements equals k in O(n) time?
Your answer
Edit
Preview
Try one AI text evaluation on us
Get structured feedback, scored against a 4-axis rubric. Premium unlocks unlimited.
0 words
target ~200
Try a free preview
Stuck? Get a hint
Past attempts
Up next
Two-Sum in Linear Time
Medium
Two Sum Implementation
Medium
A
Closest Sum Under K
Medium
Next question