File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 1111 *
1212 * @author Ujjawal Joshi
1313 * @date 2020.05.18
14+ *
15+ * Test Cases:
16+ Input:
17+ * 6 //Length of array
18+ 12 3 4 1 6 9
19+ target=24
20+ * Output:3 9 12
21+ * Explanation: There is a triplet (12, 3 and 9) present
22+ in the array whose sum is 24.
23+ *
24+ *
25+
1426 */
1527
1628
@@ -26,7 +38,7 @@ public static void main(String args[])
2638 {
2739 a [i ]=sc .nextInt ();
2840 }
29- System .out .println ("Number to be find " );
41+ System .out .println ("Target " );
3042 int n_find =sc .nextInt ();
3143
3244 Arrays .sort (a ); // Sort the array if array is not sorted
Original file line number Diff line number Diff line change 88 *
99 * @author Ujjawal Joshi
1010 * @date 2020.05.18
11+ *
12+ * Test Cases:
13+
14+ Input:
15+ 2 //Size of matrix
16+ 1 2
17+ 3 4
18+ Output:
19+ 3 1
20+ 4 2
21+ ------------------------------
22+ Input:
23+ 3 //Size of matrix
24+ 1 2 3
25+ 4 5 6
26+ 7 8 9
27+ Output:
28+ 7 4 1
29+ 8 5 2
30+ 9 6 3
31+ *
1132 */
1233
1334class main {
You can’t perform that action at this time.
0 commit comments