private void DebugSamplesButton_Click(object sender, RoutedEventArgs e) { ArrayProblems aSamples = new ArrayProblems(); //int[] result = aSamples.IsSumOf2NumsExistsInUnSortedInArray(new int[] {6,4,2,1,3,5,8,7,9 },17); int[] result = aSamples.TwoSum(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, 19); RandomArrayProblems raprbs = new RandomArrayProblems(); raprbs.Test(); }
private void FindAllTripplets_Click(object sender, RoutedEventArgs e) { string result = ArrayProblems.FindTripletInArray(); MessageBox.Show("Tripplet in Array result\n" + result); }
private void GetArrayPositionsBasedOnItsElements_Click(object sender, RoutedEventArgs e) { ArrayProblems.GetArrayPositionsBasedOnItsElements(); }
private void FindMissingAndRepeatedNumberDemoButton_Click(object sender, RoutedEventArgs e) { ArrayProblems.FindMissingAndRepeatedNumbersInArray(); }
private void LocalMinimaAndMaximaDemoButton_Click(object sender, RoutedEventArgs e) { int result = ArrayProblems.FindLocalMinima(); MessageBox.Show("Local Minima in the array is " + result); }