Deloitte NLA Coding Questions 2025 | Deloitte Coding Questions And Answers 2025

Поділитися
Вставка
  • Опубліковано 3 лют 2025

КОМЕНТАРІ • 8

  • @CodeBashers
    @CodeBashers  22 дні тому

    ✅✅Join Our Telegram Group for Infosys 2025 Batch Discussion : t.me/placement_batch_2025

  • @Arsun-77
    @Arsun-77 16 днів тому +1

    for second question we can simply use hashet where all the letters of first text should be added and then next we need to check we each letter of rahul is there in it or not if !ocntains dirreclty return 1 after loop return 0

  • @prudhviganesh4524
    @prudhviganesh4524 20 днів тому

    in the second question what if we convert it into character array and sum the ascii value of the words, if same then copied not same means not copied. Will it work?

    • @rangonathbanik1309
      @rangonathbanik1309 20 днів тому

      no

    • @nizamuddinkhan7408
      @nizamuddinkhan7408 9 днів тому

      // Online Java Compiler
      // Use this editor to write, compile and run your Java code online
      BRUTEFORCE
      import java.util.Arrays;
      class Main {
      public static void main(String[] args) {
      int marks = 0;
      String adjacentStudentWord = "HELLO";
      String RahulWord = "EHLLO";
      char arr[] = adjacentStudentWord.toCharArray();
      char arr2[] = RahulWord.toCharArray();
      Arrays.sort(arr);
      Arrays.sort(arr2);
      if(Arrays.equals(arr,arr2)){
      marks = 1;
      }
      System.out.println(marks);

      }
      }

  • @vedantzawar5218
    @vedantzawar5218 13 днів тому

    Can't we just compare the characters of both the string in single loop and if the characters on the same level don't match just stop the loop and return

  • @AvinashreddyKolan
    @AvinashreddyKolan 19 днів тому +2

    import java.util.*;
    class Main {
    public static void main(String[] args) {
    boolean ans=true;
    String s="AVINASH";
    String v="HSANIVA";
    HashMap hm=new HashMap();
    for(int i=0;i

    • @SKRaoD
      @SKRaoD 9 днів тому

      I did.