private void CombinationOfSizeR_Click(object sender, EventArgs e) { int[] values = { 1, 2, 3 }; IntProblem.combinationOfSizeR(values, new int[3], 0, 3, 0, 2); Console.WriteLine("Another approach-----------"); IntProblem.combinationOfSizeR_AnotherApproach(values, new int[3], 0, 3, 0, 2); }
private void FindNumberInSortedMatrix_Click(object sender, EventArgs e) { int[,] array = new int[, ] { { 1, 8, 12, 19 }, { 22, 25, 29, 31 }, { 33, 36, 39, 42 }, { 44, 56, 73, 82 } }; IntProblem.findValueInSortedMatrix(array, 73, 4, 4); //ArrayProblems.TraverseMatrix (array, 1, 1, 3, 1); }
private void MergeTwoSortedArray_Click(object sender, EventArgs e) { int[] array1 = new int[16]; array1[0] = 1; array1[1] = 9; array1[2] = 8; array1[3] = 12; array1[4] = 19; array1[5] = 22; array1[6] = 25; array1[7] = 29; array1[8] = 31; array1[9] = 73; array1[10] = 82; int[] array2 = new int[] { 3, 33, 36, 39, 42, 44 }; IntProblem.mergeTwoSortedArray(array1, array2, 11, 5); }
private void PrintPrime_Click(object sender, EventArgs e) { IntProblem.PrintAllPrimeNumbers(10); }
private void factorial_Click(object sender, EventArgs e) { Console.WriteLine("#### Factorial of 4: " + IntProblem.factorial(4)); }
private void intProblem_Click(object sender, EventArgs e) { IntProblem.sumOfTwoEqualK(); IntProblem.sumOfTwoEqualKDict(); IntProblem.sumOfThreeEqualK(); }
private void button2_Click(object sender, EventArgs e) { IntProblem.getMaxSumInASequenceNegetive(); }
private void subarray_sum_Click(object sender, EventArgs e) { int[] arr = { 1, 2, 3 }; IntProblem.combinationRecursive(arr); IntProblem.subArraySum(arr, 33); }
private void CombinationOfSum_Click(object sender, EventArgs e) { int[] values = { 5, 4, 3, 2, -1, -2 };// {3, 4,6,7,2,10,21,29,8, 5, 1}; IntProblem.subset_Sum(values, new int[6], 6, 0, 5, 0); }
private void FibonacciBetweenRange_Click(object sender, EventArgs e) { IntProblem.FibonacciSeriesBetweenRange(3, 55); }
private void Fibonacci_Click(object sender, EventArgs e) { IntProblem.FibonacciSeries(10); }
private void button1_Click(object sender, EventArgs e) { int[] array = { 10, 12, 17, -10, 9, 11, 2, 14, 22, 11, 22 }; IntProblem.getSequenceOfIncreasingOrderNumber(array); }
private void MaxOfTwo_Click(object sender, EventArgs e) { IntProblem.getMaxValue(10, 5); }