---
title: "Discussion on \"LeetCode: Single Number\" | Hashnode"
description: "Discussion on \"LeetCode: Single Number\". Problem:\nhttps://leetcode.com/problems/single-number/description/\nCode:\nclass Solution:\n    def singleNumber(self, nums: List[int]) -> int:\n        result=0\n        for num in nums:\n            result=result^num\n        return result\n\nKey Points:\n\nIn..."
url: "https://hashnode.com/posts/leetcode-single-number/69236f60c54a68b709e37035"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [LeetCode: Single Number](https://is-power-of-two.hashnode.dev/leetcode-single-number?utm_source=hashnode&utm_medium=feed)

Problem: https://leetcode.com/problems/single-number/description/ Code: class Solution: def singleNumber(self, nums: List\[int\]) -> int: result=0 for num in nums: result=result^num return result Key Points: In...

Nov 23, 2025 · 1 min read · is-power-of-two.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#xor](https://hashnode.com/tag/xor)

## Written by

[Shahwar Alam Naqvi](https://hashnode.com/@shahwar01)

@shahwar01

  
[View profile](https://hashnode.com/@shahwar01)

Coder

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
