Full stack Interview Question Nagarro test online Nagarro Interview Questions (Answer May be Wrong)

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

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

  • @jazzdestructor
    @jazzdestructor 9 месяцев назад +2

    its very helpful, Thankyou

  • @ambikaacharjee5125
    @ambikaacharjee5125 9 месяцев назад +1

    Really helpful.
    Thanks.

  • @deepaks7053
    @deepaks7053 6 месяцев назад

    SECTION - CODING - ANSWER
    q2:-
    function helpTeacher(x1, y1, arr1) {
    const arr = arr1; //the input array
    const x = x1; //input 1
    const y = y1; //input2
    let obj = {};
    //logic to get sum in column wise start
    for (let i = 0; i < y; i++) {
    let sum = 0;
    for (let j = 0; j < x; j++) {
    sum = sum + arr[j][i];
    obj[i] = sum;
    }
    }
    //logic to get sum in column wise end
    //logic to find which column we want to neglect start
    const obj_array = Object.entries(obj);
    const sorted_obj_array = obj_array.sort((a, b) => a[1] - b[1]);
    const del_column = +sorted_obj_array[0][0];
    //logic to find which column we want to neglect end
    //logic to get sum row wise without the ignored subject start
    let out_array = [];
    for (let i = 0; i < x; i++) {
    let sum = 0;
    for (let j = 0; j < y; j++) {
    if (j !== del_column) {
    sum = sum + arr[i][j];
    }
    }
    out_array.push(sum);
    }
    //logic to get sum row wise without the ignored subject end
    console.log("out_array", out_array); //needed output
    }
    helpTeacher(3, 5, [
    [75, 76, 65, 87, 87],
    [78, 76, 68, 56, 89],
    [67, 87, 78, 77, 65],
    ]);

  • @AjayThakur_30
    @AjayThakur_30 8 месяцев назад

    13 aptitude questions answer u marked wrong its Wednesday not Tuesday as 2012 is a leap year

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

    Coding Solutions in JavaScript:
    Sol 1:
    const smallestSubstr = (input1: string, input2: string) => {
    // Array to record all the matching combinations
    debugger
    let list = []
    let check = [...input2].every(char => input1.includes(char))
    if (check) {
    for (let i = input2.length; i input1.slice(j, i + j).includes(char))
    if (b) {
    list.push(input1.slice(j, i + j))
    break;
    }
    }
    }
    }
    console.log('l::', list)
    console.log('The smallest substring containing', input2, 'is ::', list[0])
    } else {
    console.log('Please enter a valid substring')
    }
    }
    ========
    Sol 2:
    function calculateMarks(students, subjects, marks) {
    // Initialize an array to store the sum of marks for each subject.
    let subjectSums = Array(subjects).fill(0)
    // Iterate over the students and for each student,
    // iterate over the subjects to calculate the sum of marks for each subject.
    for (let i = 0; i < students; i++) {
    for (let j = 0; j < subjects; j++) {
    subjectSums[j] += marks[i][j]
    }
    }
    let minAverageIndex = 0
    // Find the subject with the lowest average marks.
    // The average is calculated by dividing the sum of marks by the number of students
    for (let j = 1; j < subjects; j++) {
    if (subjectSums[j] / students < subjectSums[minAverageIndex] / students) {
    minAverageIndex = j
    }
    }
    // Initialize an array to store the total marks for each student.
    let studentTotals = Array(students).fill(0)
    // Iterate over the students and for each student,
    // iterate over the subjects to calculate the total marks, ignoring the subject with the lowest average.
    for (let i = 0; i < students; i++) {
    for (let j = 0; j < subjects; j++) {
    if (j !== minAverageIndex) {
    studentTotals[i] += marks[i][j]
    }
    }
    }
    // Return the array of total marks for each student.
    return studentTotals
    }
    console.log(calculateMarks(3, 3, [[50, 30, 70], [30, 70, 99], [99, 20, 30]])); // Output: [120, 129, 129]

  • @deepikameyan
    @deepikameyan 2 месяца назад

    Did you clear this assessment?

  • @AjayThakur_30
    @AjayThakur_30 8 месяцев назад

    Ques 9 answer is C not A

  • @amitmishra5867
    @amitmishra5867 5 месяцев назад

    Bhai kal interview gya aaj dekh rha hu video😢

    • @aaryan3961
      @aaryan3961 5 месяцев назад +1

      Hi Bhai, mera kal assesment hai
      any tip..please

    • @amitmishra5867
      @amitmishra5867 5 месяцев назад +1

      Bhai ye video pura dekh lo, aur iske question practice kar lo, mere case me 60% matching question tha isse

  • @great.Indian.culture
    @great.Indian.culture 11 дней назад

    10 ghante le ek sawal par