Given an array arr of positive integers and another number target. Determine whether two elements exist in arr whose sum is exactly target or not. Return true if two elements exist in the arr else return false.
Topics
Companies
Articles
Examples:
Expected Time Complexity O(n)
Expected Space Complexity O(n)
Constraints:
1 <= arr.size <= 10^5
1 <= arr[i] <= 10^5
Companies:
AmazonMicrosoftAdobeGoogleTCS + 5 more
Topics:
ArrayHashingHashmap
Please log in to access the Submissions tab, where you can review your progress and explore code submissions from other participants.
Please log in to access the Solution tab and view detailed answers and explanations.
Please log in to access the Discussion tab and join conversations with other participants.
Access Restricted: Please Login to access the code editor and test cases.