Capgemini Coding Question | Senior Analyst Role 7.5LPA | Capgemini Coding Question and Solution 2023

Поделиться
HTML-код
  • Опубликовано: 23 окт 2024

Комментарии • 12

  • @rajeshreddyinventions6044
    @rajeshreddyinventions6044 2 года назад +3

    Thank you bro
    This video may help coming capgemini exam

  • @silentxmoon867
    @silentxmoon867 Месяц назад +1

    thank you so much

  • @navalpatil4401
    @navalpatil4401 2 года назад +3

    Nice

  • @ayushgaming82348
    @ayushgaming82348 Месяц назад

    private static int minOperationsToReduceToOne(int n) {
    int operations = 0; // Counter to store the number of operations
    // Iterate until n becomes 1
    while (n > 1) {
    boolean divided = false; // Flag to check if we were able to divide
    // Full for loop to find the largest divisor from n-1 to 2
    for (int x = n - 1; x > 1; x--) {
    if (n % x == 0) { // If n is divisible by x
    n = n / x; // Divide n by x
    operations++; // Increment the operations count
    divided = true; // Set the flag to true
    break; // Exit the loop after the division
    }
    }
    // If no division happened, we subtract 1 from n
    if (!divided) {
    n -= 1; // Subtract 1 from n
    operations++; // Increment the operations count
    }
    }
    return operations; // Return the total number of operations
    }
    }

  • @bindusreekalivarapu6543
    @bindusreekalivarapu6543 Месяц назад

    How many coding questions and how much time?

  • @siddheshwayal8104
    @siddheshwayal8104 Месяц назад

    Hey my coding round is in this month can I use the python language for solving DSA questions

    • @vallabhpanigrahi4609
      @vallabhpanigrahi4609 Месяц назад

      No. Only C,C++, java

    • @iYashMall
      @iYashMall 7 дней назад

      How was your coding test ? How many test cases where there ?

  • @amaan_shaikh
    @amaan_shaikh 2 года назад

    Can I code in javascript in coding round? or in Python?

  • @Aniedits24
    @Aniedits24 Месяц назад

    {
    int x = 57;
    int count = 0;
    int n = 0;
    for (int i = x - 1; i > 2; i--) {
    if (x % i == 0) {
    n = x / i;
    count++;
    break;
    }else{
    while(!(x%2==0)){
    x = x -1;
    count++;
    }
    }
    }
    while (n != 1 && n != 0) {
    n = n - 1;
    count++;
    }
    System.out.print(count);
    }
    is this correct?

  • @souravdas5053
    @souravdas5053 2 года назад

    Which batches question ❓

  • @mayankverma3684
    @mayankverma3684 2 года назад

    mast h bhai