To the Top
File:  root - text - article - 2019 - 10 - find-the-non-duplicate-number.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Problem, Data Structures and Algorithms, | English | Home Page | Category: Computing | 311 Views, 18800 Search Bots | 60 Words

Subscribe to Feed Burner | Browse | Archive
Hi, here's your problem today. This problem was recently asked by Facebook:

Given a list of numbers, where every number shows up twice except for one number, find that one number.

Example:
Input: [4, 3, 2, 4, 1, 3, 2]
Output: 1
Here's the function signature:


def singleNumber(nums):
# Fill this in.

print singleNumber([4, 3, 2, 4, 1, 3, 2])
# 1


Challenge: Find a way to do this using O(1) memory.
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Problem, Data Structures and Algorithms, | English | Home Page | Cateogry: Computing | 311 Views, 18800 Search Bots | 60 Words Subscribe to Feed Burner

Related Articles

  1. Daily Interview Problem: Circle of Chained Words
  2. [Daily Problem] Longest Palindromic Substring
  3. Algorithm Interview Question: Symmetric k-ary Tree
  4. Daily Interview Problem: Contiguous Subarray with Maximum Sum
  5. Absolute Path
  6. Daily Interview Problem: Jump to the End
  7. Daily Interview Question: Create a Simple Calculator
  8. New Vulnerabilities (CVE-2016-4581) have been detected in CentOS/RHEL/CloudLinux 7
  9. Daily Interview Problem: Deepest Node in a Binary Tree
  10. Longest Substring Without Repeating Characters

Comments (0)

    Be the first one to comment this page !


Page Edited: May 11 2024 14:36:49 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">