two sum of number
Example heading with h2 size
Example heading with h3 size
class Solution {
public int[] twoSum(int[] nums, int target) {
int n = nums.length;
// int[]ans = new int[2];
for(int i = 0 ; i < n ; i++){
for(int j = i+1 ; j<n ; j++){
if(nums[i] + nums[j] == target){
int a[] = {i , j};
return a;
}
}
}
return null;
}
}