1-Two-Sum/Solution.java
public int[] twoSum(int[] nums, int target) {
        // int[] sumIndice = new int[2];

        for (int i = 0; i < nums.length; i += 1) {
            for (int j = i + 1; j < nums.length; j += 1) {
                if (nums[i] + nums[j] == target) {
                    return new int[] { i, j };
                }

            }
        }
        throw new IllegalArgumentException("No two sum solution");
    }
/**
     * Given an array of integers, return indices of the two numbers such that they
     * add up to a specific target. You may assume that each input would have
     * exactly one solution, and you may not use the same element twice.
     * 
     * https://leetcode.com/problems/two-sum/
     */
Given an array of integers, return indices of the two numbers such that they
add up to a specific target. You may assume that each input would have
exactly one solution, and you may not use the same element twice.


Given an array of integers return indices of the two numbers such that they add up to a specific target . You may assume that each input would have exactly one solution and you may not use the same element twice .
public int[] twoSum(int[] nums, int target) {
        for (int i = 0; i < nums.length; i += 1) {
            for (int j = i + 1; j < nums.length; j += 1) {
                if (nums[i] + nums[j] == target) {
                    return new int[] { i, j };
                }
            }
        }
        throw new IllegalArgumentException("No two sum solution");
    }
public int [ ] twoSum ( int [ ] nums , int target ) { for ( int i = 0 ; i < nums . length ; i += 1 ) { for ( int j = i + 1 ; j < nums . length ; j += 1 ) { if ( nums [ i ] + nums [ j ] == target ) { return new int [ ] { i , j } ; } } } throw new IllegalArgumentException ( "No two sum solution" ) ; }
Given an array of integers, return indices of the two numbers such that they
 add up to a specific target.
Given an array of integers return indices of the two numbers such that they add up to a specific target .
// int[] sumIndice = new int[2];