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 | 255 Views, 16914 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 | 255 Views, 16914 Search Bots | 60 Words Subscribe to Feed Burner

Related Articles

  1. Daily Interview Question: Longest Sequence with Two Unique Numbers
  2. Daily Interview Problem: 3 Sum
  3. Invert a Binary Tree
  4. Algorithm Interview Question: H-Index
  5. Algorithm Interview: Smallest Number that is not a Sum of a Subset of List
  6. Algorithm Interview: Convert Roman Numerals to Decimal
  7. Binary Tree Level with Minimum Sum
  8. Daily Interview Problem: Min Stack
  9. Daily Interview Problem: Word Ordering in a Different Alphabetical Order
  10. Daily Interview Problem: Look and Say Sequence

Comments (0)

Your Email (Domain Part Not Exposed):

Your Comments:

Privately By Mail Colors More Smileys S x y @

Verification (Click Image 2 Refresh):

    Be the first one to comment this page !


Page Edited: October 30 2020 14:21:09 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />