Tesla second technical round interview

Round 3 of 6 · 16 questions reported

See the whole loop
Length
45 min
Format
Coding, often combined with team fit

Questions Tesla asks in this round 16

  • Collect the characters along a path in a gridCodingA 2D grid has one path that starts at (0, 0); path cells hold either or a letter, and other cells are empty. Follow the path and return the letters on it, in order, as a string…
    Last asked Aug 2026
  • Decode waysCodingLetters are encoded as numbers, A = 1 through Z = 26. Given a string of digits, count how many ways it can be decoded back into letters. Handle zeros carefully and solve it with…
    Last asked Jun 2026
  • Shortest bridge between two islandsCodingA binary grid contains exactly two islands of 1s (4-directionally connected). Return the fewest 0 cells you must flip to 1 to connect them. Find one island with DFS, then expand…
    Last asked Jun 2026
  • Per-position feedback for a guess against a secret wordCodingGiven a secret word and a guess of the same length, return feedback for each position of the guess, Wordle style: the letter is in the right place, is in the word but elsewhere…
    Last asked May 2026
  • Time for an infection to spread through a binary treeCodingA binary tree catches fire (or an infection) at one given node. Every minute it spreads to the neighbours of each burning node: its children and its parent. Return how many…
    Last asked Jan 2026
  • Caesar cipher with wraparound shiftsCodingImplement caesarencrypt(text: str, k: int) - str, which applies a Caesar cipher to text. Every ASCII letter moves k places forward in the alphabet. The alphabet is circular, so a…
  • Fuel station queue with three dispensersCodingA fuel station has three dispensers named X, Y and Z. Each starts with a known number of liters. A queue of cars waits at the station, and all of them are in line at time 0. Car i…
  • Largest island perimeter in a gridCodingYou are given an m x n grid where each cell is either land ("1") or water ("0"). Land cells that touch horizontally or vertically (not diagonally) belong to the same island. Treat…
  • Largest subset with a non-zero bitwise ANDCodingGiven an array arr of positive integers, choose as many elements as you can so that the bitwise AND of all chosen elements is greater than 0. The chosen elements can come from…
  • Minimum root-to-leaf path sumCodingGiven the root of a binary tree whose nodes hold integers (values may be negative), find the root-to-leaf path with the smallest sum. A leaf is a node with no children. A…
  • URL router with single-segment wildcardsCodingBuild a small URL router. - A pattern and a path are split on / into segments. Empty segments are ignored, so /a/b/ is the same as /a/b, and / is the empty path. - A p
  • Window with the most copies of a target valueCodingImplement mosttargetwindow(nums, targetindex, windowsize). The target value is numstargetindex. Look at every contiguous subarray of nums with exactly windowsize elements. Return…