Update TwoPointersAlgo.java

This commit is contained in:
Varun Vaibhav Jha 2020-09-17 11:07:43 +05:30 committed by GitHub
parent 4d301033b1
commit 0be35c67dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,8 @@ import java.util.*;
import java.lang.*; import java.lang.*;
import java.io.*; import java.io.*;
//https://www.geeksforgeeks.org/two-pointers-technique/
class TwoPointersAlgo { class TwoPointersAlgo {
//This function prints all pairs in the array that sum to a number X. If no such pair exists then output will be -1. //This function prints all pairs in the array that sum to a number X. If no such pair exists then output will be -1.
static void twoSum(int A[], int X) static void twoSum(int A[], int X)