Single Number 1 - HashMap Solution || Leetcode 136 || Interview Questions - Amazon, Facebook , Apple

Опубликовано: 24 Март 2026
на канале: swadhyayedu
6,849
72

Problem Statement:
Leetcode problem number 136

Given a non-empty array of integers, every element appears twice except for one. Find that single one.

Note:

Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?

Example 1:

Input: [2,2,1]
Output: 1
Example 2:

Input: [4,1,2,1,2]
Output: 4

Solution: The solution uses Hash map to find out the single number.

Also check out our other videos :

Single number 1 - Bit manipulation :    • Single Number 1-Bit Manipulation (Solution...  

Single number 1 - Hashmap solution :    • Single Number 1 - HashMap Solution || Leet...  

Frequently asked JavaScript interview questions- part 1:    • Top 5 JavaScript Interview Questions | Mos...  

Follow us on instagram :
  / codegeekslab  

#Bloomberg #amazon #facebook
#java #algorithm #javainterviewquestions #datastructure #javadeveloper #javacommunity #javalearning #javacoder #javadev #coding #programming #code #dev #interview #codinginterview #girlswhocode #menwhocode #womenwhocode #developer #webdeveloper #backenddeveloper #developerlife #softwaredeveloper #softwareengineer #tech #webdevelopment #LEETCODE #PROBLEMNUMBER136 #LEETCODE136