Skip to content

LeetCode 371: Sum of Two Integers #71

@github-actions

Description

@github-actions

LeetCode 371: Sum of Two Integers

Category: Binary
Difficulty: See LeetCode
Solution File: src/binary/sum_of_two_integers.py
Test File: tests/test_sum_of_two_integers.py

Problem Description

Given two integers a and b, return the sum of the two integers without using the operators + and -.

Example 1:
Input: a = 1, b = 2
Output: 3

Example 2:
Input: a = 2, b = 3
Output: 5

Constraints:

  • -1000 <= a, b <= 1000

Tasks

  • Implement the solution in src/binary/sum_of_two_integers.py
  • Ensure all test cases pass
  • Analyze time complexity
  • Analyze space complexity

Metadata

Metadata

Assignees

No one assigned

    Labels

    binaryBlind 75 - Binary problemsblind-75Blind 75 - Blind-75 problems

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions