One problem a day logo One problem a day
Browse problems
All problems 944 About this project

Categories

  • Array & Hashmap 217
  • Backtracking 33
  • Binary Search 27
  • Bit Manipulataion 25
  • Design 46
  • Dynamic Programming 85
  • Graph 74
  • Greedy 59
  • Heap 44
  • Intervals 16
  • Linked List 50
  • Math & Germetry 85
  • Queue 15
  • Sliding Window 29
  • Stack 48
  • Tree 122
  • Trie 14
  • Two Pointers 31

© 2026 One problem a day

Problems Add two integers
math and geometry December 17, 2022

Add two integers

Time O(1) Space O(1) Open original problem

This is a stupid problem. We can just add to numbers and return the result.

class Solution:
    def sum(self, num1: int, num2: int) -> int:
        return num1+num2

Time complexity: O(1)
Space complexity: O(1)

Previous problem ← Apply discount to prices
Next problem Powerful integers →

On this page

Start typing to search all 944 problems.
↑↓ Navigate ↵ Open Powered by Fuse.js