Cars24 | SDE1 - React Native | Bengaluru [Rejected in Round 1]
Anonymous User
1877

Personal Details

College: Tier 3 (One of the Top 3, in Karnataka) — graduated in 2020
Previous Role: SDE 1 (React Native)
YOE: ~1.5 years
Last working day: 31-03-2021 (Left the job to take care of a personal tragedy due to COVID-19)
Previous CTC: 13.22L
Interview was scheduled by: Cars24's HR contacted me using Naukri profile.
Expected CTC: I was asked on the call, but I told her that we could discuss it after the Coding rounds, in the HR round. She reluctantly said OK.

NOTE: This is for React Native SDE 1 role — But as you will see, there are no questions on it. Read on, to know why.

Since I have not seen a lot of Frontend experiences, especially for RN roles, I wanted to add this here, so that it could help someone doing React Native.


Interview Process

NOTE: I had not prepared on any topic thoroughly and it was only 2 months since I was back into coding after the long "break".

Round 1 (~1h 15m)
• He started with Basics of JS.

  1. var / let / const

  2. Hoisting — Definition, process of hoisting for var and let / const (He didn't ask about Temporal Dead Zone for me in this interview, but it is a likely question to follow. I didn't mention of TDZ at that time, so it might have slipped his mind. In anycase, you must prepare on those questions).

  3. Scope — Definition, Types (Function & Block scoping). var and let in different scope scenarios.

  4. Closures — Definition, Uses, and real world application of it. He also asked about using it in my code from my previous experience.

Snippets of this type were asked.

function test() {
  for (var i = 0; i < 3; i++) {
    setTimeout(function log() {
      console.log(i);
    }, 1000);
  }
}
test();

Output:
3
3
3

If you see this question without any context (by that I mean, if you are not aware that this relates to Closures, you won't think to see the scope of variables at the first glance), you will find it difficult to predict the answer.

Another question

console.log("Print 1");

setTimeout(() => {console.log("Print 2")}, 10);

console.log("Print 3");

setTimeout(() => {console.log("Print 4")}, 0);

Output:
Print 1
Print 3
Print 4
Print 2

These are not difficult to understand, but if you haven't read about the way asynchronous behaviour is executed in JS, you won't be able to answer these easily.

Also read about how the following functions work Promise.resolve(), setTimeout(), setImmediate() and process.nextTick(). Test out how they execute when they are all put together.

You can watch all those from YT on this Codevolution's playlist.

  1. Spread and Rest operator — Definition and its difference. I didn't know the exact definition of rest operator then. I knew vaguely that it was used as a catch-all variable for extra arguments.
function test (arg1Arr, arg2Obj, ...restArgs) {
  const arr = [...arg1Arr] // This is spread
  const obj = {...arg2Obj} // This is also spread
  
// Print no of extra elems passed as args, excluding first two args
  console.log(restArgs.length); 
}

test([1, 2, 3], { a: 1, b: 2 }, 8, 'string', 'c', { topObj: { deepObj: '' } });

Output will be

4

  1. Shallow copy v/s Deep copy — He asked about its difference directly. I was not aware of its basics, so I fumbled, he evidently got to know about it.

He asked some more JS related basic questions, I don't remember all of them now. I will update here, if I remember in the future.

• Then he went on to ask if I knew of class based components. I said NO (Reason was that it was already 2 years since I had worked on it, and I knew he would ask me about the usual questions, apply / bind / call methods, which I had not studied).
• Finally we came to React (Yes, not RN!).

He asked me about Hooks, and which of them I had used till now. I replied with useEffect, useState, useCallback and useMemo.

He asked the usual question of how to make useEffect equivalent to class based components' lifecycle methods. It is about the dependency array being empty, and so on.

useCallback vs useMemo: I had read about this in narrow sense.
He asked me what will happen when a changes in this code.

const sum = useMemo(() => a + b, [a, b])

He asked me what will happen when a and b are interchanged. Like if a = 5, b = 10 in the current render, what will happen when a = 10, b = 5. Basically, he was testing if I knew the comparison done on each render. I was not very sure, so I said it will not recalculate as the sum is the same (I know it is really naive! But I didn't know the answer then), and that react will memoize whenever the result is the same (I told this because I had read about caching being done, when values don't change. Which 'values' ? That I was not sure!).

FYI, useMemo is used to keep using the same value when the re-render happens on another state variable change. If you didn't have any change to a or b, then in the next render sum will not be recalculated, as the values of a and b are cached (Yes! it is the dependency variable that is compared between renders not the calculated value using these variables).
Next it was Custom hooks. He asked me if these had their own lifecycle. In the sense, if I use two instances of the custom hook, are they different or same ?

He asked me about Context API. I said I knew that it was used for re-using a variable in a deeply nested child without doing prop-drilling, but I had not worked on it in my prev company. So he left that.

He asked if I had used Redux. Though I had worked on it, it was not in my memory. So I said the same. At this point I had to remind him of the 2+ yrs gap. I think, in his mind there was no use of interviewing any further, as I had little understanding of many concepts and on top of that I was not working for 2 years. He asked the last question, "Do you have any Questions for me ?" (Indicating the end of the I/w).

Basically, there were no Questions on RN. It makes sense, Right? I think it was due to the fact that I didn't have proper understanding of React itself. So he didn't proceed to ask questions on RN.


After the I/w, the HR came to me and said, "You can leave for today. You can contact the Recruiter, if you need feedback."

I did mail her, later that day for the feedback.

I am pasting it here (NOTE: I have made some formatting changes, and rearranged them for better readability. Obviously the scores are not changed).

let vs var vs const		- Yes
Closures				- Yes
React basic 			- Yes
Hooks basic 			- Yes

promise vs async await	- Avg
useEffect 				- Avg
custom Hooks			- Avg
useCallback vs useMemo	- Avg

spread 					- No
Shallow/deep copy 		- No
React.memo 				- No
Context 				- No
Redux 					- No

Some reflections:

  1. I was not prepared for the interviews, and didn't know that these kind of basic questions would be asked.
  2. I had asked a college friend to guide me regarding preparation for the interview and he directed me to learn the basics of Computer Networks, Operating System, and DBMS. I realised after this interview that he was telling about Backend Engineering roles. In FE roles, these topics are not generally asked, atleast in the beginning of the career (upto 2 YOE). I am not sure if that is the case in all companies (Comment with "Yes, CN, OS and DBMS are not asked in Frontend Roles" if you confirm with this assumption). But at CARS24, I was not asked both the times.
  3. I was conceptually poor in many areas. I didn't know of the concept of Closures, Hoisting, how references work, shallow copy and deep copy, till I started reading / coding exclusively for interviews.
  4. I had to come back with a bang! Had to learn all the things that were missing.
  5. It was good for me to ask for the feedback, as it was helpful in reading / focussing on them.
  6. The Interview was not as tensed as I thought it would be.
  7. Though I could not answer these topics, they were not conceptually difficult to understand.
  8. I got a broad understanding of what all topics will be asked in a premium company, like Cars24, in the Interview. (I think this is the biggest learning!)

I interviewed again at Cars24, after some months. Like this post, if you want to know what happened. Stay tuned! Happy Coding!

Here's the link to the second Interview I took, after a few months.

Comments (2)