Posts

Learning of Foreign Languages with Certification

Image
Learning of Foreign Languages with Certification The Foreign Languages Courses are done from Udemy and Cursa Platform. I hereby confirm that the Foreign Language Courses with Certification are solely done by me from Udemy and Cursa Platform.   #MAR #MARACTIVITY #MARPOINTS #MAKAUT #SKFGI #FOREIGNLANGUAGE #mar #maractivity #marpoints #makaut #skfgi #foreignlanguage Total Unique Language Learned = 6 ---> Chinese, Russian, Portuguese, Swedish, Polish, German. Name of Unique Courses with Certificate: Udemy:- 1.Chinese Language & Culture Beginners Course HSK1 1-3 2. Learn Portuguese (from Portugal) - A1 & A2 levels 3. Daily Russian Language Course 4. Idiom Stories V1-HSK 4-HSK 6 Intermediate Chinese Reading 5. Learn Swedish Idioms A Fun Swedish Course for Beginners! 6. German Language Course - Authentic Dialects and Accents Cursa:- 7.Russian for Beginners by Real Russian Club 8. Russian by Learn russian easily 9.Mandarin with Litao 10. Poli...

Coding Solution 08

Image
Write a Java program to check if sum of a pair from the array is equal to a specific number. Code: public class Exercise22 { static void  pairs_value(int inputArray[], int inputNumber)   {   System.out.println("Pairs of elements and their sum : ");     for (int i =  0; i < inputArray.length; i++)   {   for (int j  = i+1; j < inputArray.length; j++)   {   if(inputArray[i]+inputArray[j] == inputNumber)   {   System.out.println(inputArray[i]+" + "+inputArray[j]+" =  "+inputNumber);   }   }   }   }      public static void  main(String[] args)   {   pairs_value(new int[] {2, 7, 4, -5, 75, -60, 8, 11, 5, 20}, 15);      pairs_value(new int[] {14, -15, 9, 16, 25, 5, 16, 45, 12, 8}, 30);      } } Output: Output Link:  https://ide.geeksforgeeks.org/gP4uOj0kEV I hereby confirm that the coding solution is written by me and complied & ru...

Coding Solution 07

Image
Write a Java program to check if a sub-array is formed by consecutive integers from a given array of integers. Code: import java.lang.Math; import java.util.Arrays; class solution { static boolean is_consecutive(int nums[], int i, int j, int min, int max) { if (max - min != j - i) { return false; } boolean check[] = new boolean[j - i + 1]; for (int k = i; k <= j; k++) { if (check[nums[k] - min]) { return false; } check[nums[k] - min] = true; } return true; } public static void find_Max_SubArray(int[] nums) { int len = 1; int start = 0, end = 0; for (int i = 0; i < nums.length - 1; i++) { int min_val = nums[i], max_val = nums[i]; for (int j = i + 1; j < nums.length; j++) { min_val = Math.min(min_val, nums[j]); max_val = Math.max(max_val, nums[j]); if (is_consecutive(nums, i, j, min_val, max_val)) { if (len < max_val - min_val + 1) { len = max_val - min_...

Coding Solution 06

Image
Find the length of the longest consecutive elements sequence from a given unsorted array of integers. Code: import java.util.HashSet; public class Exercise34 {        public static void main(String[] args) {         int nums[] = {7, 49, 1, 3, 200, 8, 2, 4, 6, 70, 5};   System.out.println("Original array length: "+nums.length); System.out.print("Array elements are: ");        for (int i = 0; i < nums.length; i++)         {             System.out.print(nums[i]+" ");         } System.out.println("\nThe new length of the array is: "+longest_sequence(nums));     }          public static int longest_sequence(int[] nums) {       final HashSet<Integer> h_set = new HashSet<Integer>();         for (int i : nums) h_set.add(i);         int long...

Coding Solution 05

Image
 Quick Sort Code: //https://ide.geeksforgeeks.org/eIKy4ZJwx7 import java.util.Arrays; public class QuickSort {           private int temp_array[];     private int len;       public void sort(int[] nums) {                   if (nums == null || nums.length == 0) {             return;         }         this.temp_array = nums;         len = nums.length;         quickSort(0, len - 1);     }      private void quickSort(int low_index, int high_index) {                   int i = low_index;         int j = high_index;          int pivot = temp_array[low_index+(high_index-low_index)/2];         while (i <= j) {             ...