Capgemini Java Coding Interview | Watch this if you want offer

In this video, we covered Capgemini Coding Interview Questions. The candidate got selected in the company with the offer of 10LPA.
We solved two problems.
1.) Finding the missing number from the array
2.) Convert first half of the String in lower case and second half in upper case

Пікірлер: 55

  • @ashishsrivastav11111
    @ashishsrivastav11111 Жыл бұрын

    Great ..now we are aware of character class and its methods, toUpperCase(), toLowerCase()

  • @roshanpatro5777
    @roshanpatro5777 Жыл бұрын

    Really good questions. Thank you!! Please, make videos on questions related to Collection also.

  • @Tusharsharma028
    @Tusharsharma028 Жыл бұрын

    tysm for teaching begneers

  • @sanketpatil6084
    @sanketpatil6084 Жыл бұрын

    i was asked missing and repeating number program for 3.5 lpa package

  • @nikhileshyoutube4924
    @nikhileshyoutube4924 Жыл бұрын

    Excellent

  • @radhikagadve
    @radhikagadve Жыл бұрын

    If they really ask these questions I'm gonna go into interviews right now

  • @helpinghand6041
    @helpinghand6041 Жыл бұрын

    One more way to do this, will just go on checking with the reference of index value I will check with arr[0] == I+1 if not the missing element is the I+1

  • @parthjethwani1837

    @parthjethwani1837

    Жыл бұрын

    array need to be sorted

  • @helpinghand6041

    @helpinghand6041

    Жыл бұрын

    @@parthjethwani1837 yes

  • @deepakraj-bu3ez
    @deepakraj-bu3ez11 ай бұрын

    public static void main(String[] args) { int [] arr = new int []{1,2,3,5, 6,7,8,9} ; int n= arr. length+1; int sum = n* (n+1) /2; for (int i : arr ){ sum -= i; } System.out .printIn("Missing number is "+sum);

  • @somublackstar
    @somublackstar Жыл бұрын

    please don't do DS and Algo, we can get this easily. Do class related videos like Employee, list of employees , increase their salary, group by etc

  • @OS-bt7il
    @OS-bt7il Жыл бұрын

    if only one no is missing then only answer will work.what if 2 no are missing .

  • @pca33teja93
    @pca33teja93 Жыл бұрын

    Don't you think for missing number code the formula will result in overflow if n is very very large

  • @cloudtech5260

    @cloudtech5260

    Жыл бұрын

    Hi Teja, Very good question. This logic can handle upto n = 46300 elements easily. The calculation n*(n +1) will still fit in int data type. If you want even more elements then we can go for long data type.

  • @mohammedajazquadri7869
    @mohammedajazquadri7869 Жыл бұрын

    Birlliant

  • @AmanGupta-vc1om
    @AmanGupta-vc1om Жыл бұрын

    So you don't need any actual DSA problem solving skills for Capgemini?? Is it that easy or am i missing something

  • @cloudtech5260

    @cloudtech5260

    Жыл бұрын

    For Capgemini Java 8 is enough. 👍

  • @rahulkharapkar9962

    @rahulkharapkar9962

    Жыл бұрын

    Cloudtech ,not anymore... I am working on java 11 and it's not this easy for sure they do ask array and some advanced DSA concepts as well.. this looks like fresher interview

  • @omprakashnaik693

    @omprakashnaik693

    Жыл бұрын

    @@rahulkharapkar9962 hii bro

  • @java_minds1755
    @java_minds1755 Жыл бұрын

    String s = "India is My Country India is My Country"; String s1 = s.substring(0,s.length()/2); String s2 = s.substring(s.length()/2); String result = "\0"; result = s1.toLowerCase(); result += s2.toUpperCase(); System.out.println(result);

  • @kiranbhopale1249

    @kiranbhopale1249

    Жыл бұрын

    What is meaning of "\0" ?

  • @surabhisahu1231

    @surabhisahu1231

    Жыл бұрын

    @@kiranbhopale1249 means null Like 0 in integers

  • @ramakrishnakoonapareddy3251

    @ramakrishnakoonapareddy3251

    Жыл бұрын

    Ur logic so simple sir

  • @bhabanisankar1770

    @bhabanisankar1770

    Жыл бұрын

    String s1=s.substring(0,(s.length()/2).toLowerCase(); String s2=s.substring(s.length()).toUpperCase();

  • @harshwardhanshetty4683

    @harshwardhanshetty4683

    Жыл бұрын

    @@ramakrishnakoonapareddy3251 i think it's readability is simple

  • @kvnagendra5354
    @kvnagendra5354 Жыл бұрын

    Plz post real time questions

  • @cloudtech5260

    @cloudtech5260

    Жыл бұрын

    Yes will do. 👍

  • @gauravkumar6124
    @gauravkumar6124 Жыл бұрын

    I must have the worst luck, for a 5LAP job, they asked me codewars morse code advance, as a fresher. 🤣🤣

  • @cloudtech5260

    @cloudtech5260

    Жыл бұрын

    Hi Gaurav, Which company 😁

  • @gauravkumar6124

    @gauravkumar6124

    Жыл бұрын

    @@cloudtech5260 giyzer systems.

  • @cloudtech5260

    @cloudtech5260

    Жыл бұрын

    Great! Have a wonderful career ahead 👍

  • @gauravkumar6124

    @gauravkumar6124

    Жыл бұрын

    @@cloudtech5260 na, i got rosted in that interview, i didn't know what i am supposed to do😅😅

  • @gauravkumar6124

    @gauravkumar6124

    Жыл бұрын

    @@cloudtech5260 official feedback was that, candidate is arrogant, rude and does not know coding.

  • @shivarajhiremath5963
    @shivarajhiremath59632 ай бұрын

    Here is the simplest way public class StringQuestion { public static void main(String[] args) { String str="Capgemini Coding Interview Questions Capgemini Coding Interview Questions"; String upper=str.substring(str.length()/2,str.length()).toUpperCase(); String lower=str.substring(0,str.length()/2).toLowerCase(); System.out.println("The final output is "+lower +" " +upper); } }

  • @anitakaruturi
    @anitakaruturi Жыл бұрын

    Sound is too low!

  • @cloudtech5260

    @cloudtech5260

    Жыл бұрын

    We will fix in upcoming videos!! 👍

  • @swapnilbagul7502
    @swapnilbagul7502 Жыл бұрын

    This is not an actual capgemini interview....

  • @cloudtech5260

    @cloudtech5260

    Жыл бұрын

    This is mock interview with actual questions.

  • @ashoksaho
    @ashoksaho Жыл бұрын

    If I provide the number in put how u find the last element in this case 10

  • @cloudtech5260

    @cloudtech5260

    Жыл бұрын

    Hi Ashok, We already know the sum of first 10 numbers using formula sum1 = n*(n+1)/2. We will then take the sum of input array. Missing number = sum1 - sum of input array

  • @lonestoryteller5430
    @lonestoryteller5430 Жыл бұрын

    He could have taken an variable with initial value of 1 and compare it with every element. If equal, increase value of that variable. Where the variable and element value differ, break the loop and cur value of that variable is the output.

  • @AshishKumar-cy7dx

    @AshishKumar-cy7dx

    Жыл бұрын

    For that there will be two for loop.time complexity will be O(n^2).here it is O(n).

  • @lonestoryteller5430

    @lonestoryteller5430

    Жыл бұрын

    @@AshishKumar-cy7dx Nope. If the array is sorted and increasing or decreasing by 1, as given in the problem, it will take only linear TC.

  • @AshishKumar-cy7dx

    @AshishKumar-cy7dx

    Жыл бұрын

    @@lonestoryteller5430 array is not sorted.for sorting again you need to run two for loop

  • @lonestoryteller5430

    @lonestoryteller5430

    Жыл бұрын

    @@AshishKumar-cy7dx No brother. Listen to the problem statement carefully. It says there n numbers are given then the interviewer says suppose 1 to 10 and one number is missing. Also, we don't need nested loops to sort the array. Arrays.sort () function will do it in logN TC

  • @AshishKumar-cy7dx

    @AshishKumar-cy7dx

    Жыл бұрын

    @@lonestoryteller5430 you listen and understand problem statement .u can't use inbuilt function in any interview.its is just one of case in sorted order,you have to write logic for all case.

  • @alim241081
    @alim241081 Жыл бұрын

    capgi bht chindi company hai package ke mamle me

  • @Natkhat_reels_n_Vlogss

    @Natkhat_reels_n_Vlogss

    Жыл бұрын

    With 2 year bond😂🤣

  • @85PREMKUMAR
    @85PREMKUMAR Жыл бұрын

    String lowerUpperString = new StringBuilder().append(str.substring(0, mid).toLowerCase()).append(str.substring(mid).toUpperCase()).toString();