cswork / libraryOpen practice workspace

Interview experiences · Apple

Apple Full Stack Engineer Interview Experience — React JS and Java Coding Rounds

Tech screenInterviewed 2026-07

React JS Coding Round In incognito mode, if you open a site like Amazon.com or Flipkart.com, what are some ways to optimize the page's load speed? Is JavaScript single-threaded or multi-threaded? What is the event loop? Does JS execute top to bottom, or the other way around? If you fetch 10M records via an API in JS and render them in a table in the UI, what problems show up in the UI? How would…

React JS Coding Round

  1. In incognito mode, if you open a site like Amazon.com or Flipkart.com, what are some ways to optimize the page's load speed?
  2. Is JavaScript single-threaded or multi-threaded? What is the event loop? Does JS execute top to bottom, or the other way around?
  3. If you fetch 10M records via an API in JS and render them in a table in the UI, what problems show up in the UI? How would you solve them?
  4. What's the output of the following code?
for (var i = 0; i < 10; i++) {
  setTimeout(() => {
    console.log(i)
  }, 0)
}
  1. What's the difference between the var and let keywords in JS?
  2. What are closures in JS? Give an example.
  3. What is the Temporal Dead Zone in JS?
  4. Implement a collapsible/expandable component with +/- buttons, given this data structure:
const data = {
  "id": 1,
  "name": "Root",
  "children": [
    {
      "id": 2,
      "name": "Child 1",
      "children": [
        {
          "id": 3,
          "name": "Child 1.1"
        },
        {
          "id": 4,
          "name": "Child 1.2"
        }
      ]
    },
    {
      "id": 5,
      "name": "Child 2"
    }
  ]
};
  1. What's the difference between setTimeout and setInterval?
  2. What does the defer attribute do in HTML? Can it be used on an img tag?

Java Coding Round

  1. Given an undirected graph with n nodes (labeled 0 to n - 1) and an edge list edges, where edges[i] = [u, v] represents an undirected edge between node u and node v.

Determine whether the graph can be colored using exactly 2 colors such that no two adjacent nodes share the same color. Return true if it can, false otherwise.

Comments

Nothing here yet.

Join in on CSWork →