LeetCode #Single Number #Java

    LeetCode[day1] - Single Number

    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 0. 내가 하고 싶은 것 Input은 주어진 숫자들에 대해서 쌍을 이뤄서 어떤 값들이 들어있다고 한다. 이 때, Stream 코드와 단순 코드로 해당 알고리즘을 구해보려고 한다. 1. 단순 ..