Skip to content

Title: Implement Two Sum Algorithm #59

@rugved0102

Description

@rugved0102

Initiative (Required)

GSSoC 2024 Extd 🚀

Is your feature request related to a problem? Please describe.

Implement a function to solve the "Two Sum" problem. Given an array of integers (nums) and an integer (target), the goal is to return the indices of two numbers from the array such that their sum equals the target.

You must assume that:

Each input will have exactly one solution.
The same element cannot be used twice.
The result can be returned in any order.
Example Input/Output:
Example 1:

Input: nums = [2, 7, 11, 15], target = 9
Output: [0, 1]
Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].

Describe the solution you'd like.

Solution for the described problem.

Add any other context or screenshots about the feature request here.

contributing under hactoberfest'24 and gssoc'24 ext

Metadata

Metadata

Assignees

No one assigned

    Labels

    Assigned📋This issue has been assigned to you!Closed:🚫This issue or PR is closed due to invalidity or prolonged inactivity and lack of updates.No_UpdateIt's been so long you are not responding to this issue so we are going to close the issue soon.hacktoberfest2024Your contribution is part of Hacktoberfest 2024! 🎉

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions