Role:- Software Developer Intern

Hiring Process:-

  1. Technical Screening -> Assignment
  2. Technical Interview 1
  3. Technical Interview 2

Assignment:-

Rick and Morty API Usage:- https://rick-morty-react-sanil.vercel.app/

Got a call from HR for Technical Interview 1.

Technical Interview 1 :-

  • Started with an introduction about me.

  • Asked about my projects and programming languages along with current tech stacks.

  • Coding Question(DSA):-

  1. /**
    print numbers from 1 to n, where
    if a number is divisible by 3 print fizz,
    if a number is divisble by 5 print buzz,
    if a number is divisble by both print fizzbuzz
    else print the number
    @method fizzBuzz
    @param n {number} last no in the fizzbuzz sequence
    @return void
    */

My Answer:-

var res = new Array();
function solve(n) {
    for(var i = 1 ; i <= n ; i++) {
    if(i%15 == 0) {
        // console.log("FizzBuzz");
        res.push('FizzBuzz');
    }
    else if(i%3 == 0) {
        // console.log("Fizz");
        res.push('Fizz');

    }
    else if(i%5 == 0) {
        // console.log("Buzz");
        res.push('Buzz');

    }
    else {
        // console.log(i);
        res.push(i);
    }
}

return res;
}

solve(20);
  1. https://learnersbucket.com/examples/interview/usetoggle-hook-in-react/
  2. What do you mean by DOM and BOM? How do you modify DOM?
function sleep(ms) {
      return new Promise(resolve => setTimeout(resolve, ms));
}

async function Tutor() {
    for (let i = 1; i < 2 ; i++) {        
        await sleep(5000);
        console.log(res);
    }
}
Tutor()
  1. Explain Promise and how does it implement sleep function? Why async and await is used along with promises?
  2. Difference between React.js and Javascript?
  3. Is React.js framework or library?
  4. Difference between framework and library.
  5. What do you mean by states and classes?
  6. Is Javascript an OOP language?
  7. How do you find the length of an array in JavaScript?

Leetcode Questions:-

  1. https://leetcode.com/problems/fizz-buzz/
  2. https://leetcode.com/problems/sleep/
  3. https://leetcode.com/problems/return-length-of-arguments-passed/
  • Told me about perks of using Javascript with an example of var keyword.

Behavioural Questions:-

  1. How will you manage remote working rather than working from workstation/office?
  2. What will you do if in a team if there are 2 ways to solve a task, one by you and the other by your colleague? What will be your stance at that moment?

Result:- Qualified for Round 2
Experience:- Positive
Difficulty:- Medium

Technical Interview 2 :-

  • Started with an introduction about previous round.

  • Coding Question(OOP):-

  1. /**
    find difference between two objects
    with given keys and their values,
    print their difference,
    also change a key value in one object
    and print the change in key values of both the objects
    */

My Answer:-

const student1 = { firstname: 'sunil', secondname: 'kumar'  }
const student2 = { firstname: 'abc', secondname: 'xyz', age: '21' }
const student3 = { age: '30' }
// const student4 = student3;
const student4 = JSON.parse(JSON.stringify(student3));

console.log(student3);
console.log(student4);

// Object.keys(myObject).forEach((item) => {
//     if(typeof myObject[item] == "age" && myObject[item] === '30') {
//         myObject[item] = 10
//     }
// })

// const newstudent4 = JSON.parse(JSON.stringify(student4));
student4.age = '45';
console.log(student3);
console.log(student4);

// const c = Object.entries(student2).reduce((c, [k, v]) => Object.assign(c, student1[k] ? {} : { [k]: v }), {});

// console.log(c);
  1. Explain Promise?
  2. Do you know Higher Order Functions?
  3. Difference between Shallow Copy and Deep Copy?
  4. What is pass by reference and pass by values?
  5. What is stringify?
  6. What are Reduce & Assign Functions?

Leetcode Questions:- (Conceptually)

  1. https://leetcode.com/problems/differences-between-two-objects/
  2. https://leetcode.com/problems/compact-object/
  3. https://leetcode.com/problems/chunk-array/
  4. https://leetcode.com/problems/is-object-empty/
  • Suggested me to go through the MDN Javascript for conceptual clarity.

Result:- Not selected
Experience:- Average
Difficulty:- Medium

Comments (2)