Thinkhat interview experience Real time questions & tips from candidates to crack your interview

Backend Developer

Thinkhat
upvote
share-icon
2 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Journey
I prepared for the interview by studying commonly asked questions found through Google research, supplemented by resources provided by Coding Ninjas. Additionally, I followed a structured DSA (Data Structures and Algorithms) sheet to systematically practice problems, ensuring I strengthened both my problem-solving skills and core programming concepts.
Preparation
Topics: Java Script, Node, Express, SQL
Application process
Where: Coding Ninjas Placement Cell
Eligibility: B.Tech (CS/IT), MCA, M.Sc — 2023-2025 graduates

Interview rounds

01
Round
Medium
Online Coding Interview
Duration
Interview date4 Jun 2025
Coding problem1

1. Snake and Ladder – Possible End Positions After One Dice Roll

Given a board with N positions (1 to N) and a starting position start, some positions have teleporters that move you to a target position (ladders or snakes). Roll a six-sided dice once:

  1. Move from start to start + roll (1 ≤ roll ≤ 6).
  2. If the new position has a teleporter, follow it once.
  3. Ignore positions beyond N.

Return a list of all possible final positions after one roll and any teleportation.

Input:

  • N: board size
  • start: current position
  • teleporters: {source: target}

Output:

  • List of integers representing all possible final positions.
02
Round
Medium
Online Coding Interview
Duration
Interview date1 Aug 2025
Coding problem1

1. Count Paths with Given Sum in a Binary Tree

You are given the root of a binary tree and an integer targetSum. Determine the total number of downward paths where the sum of node values along the path equals targetSum.

Important Notes:

  1. Paths must move downwards (parent → child).
  2. A path does not need to start at the root or end at a leaf.
  3. Each path must consist of consecutive nodes connected through parent-child relationships.

Example:
Binary Tree:

       10
     /  \
    5   -3
   / \    \
  3   2   11
 / \   \
3  -2   1

targetSum = 8

Output: 3

Explanation:
The three valid paths that sum to 8 are:

  • 5 → 3
  • 5 → 2 → 1
  • -3 → 11
Problem approach

You need to check every possible starting node, and from that node, recursively check all downward paths that could sum up to targetSum. 

To do this efficiently: Traverse every node in the tree. 

At each node, try all downward paths starting from it and count how many of them sum to targetSum. function pathSum(root, targetSum) { if (!root) return 0; // Count paths that start from the current node function countPathsFromNode(node, remainingSum) { if (!node) return 0; let count = 0; if (node.val === remainingSum) count++; count += countPathsFromNode(node.left, remainingSum - node.val); count += countPathsFromNode(node.right, remainingSum - node.val); return count; } // Try all nodes as starting point return ( countPathsFromNode(root, targetSum) + pathSum(root.left, targetSum) + pathSum(root.right, targetSum) ); }

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3319 views
0 comments
0 upvotes
Backend Developer
2 rounds | 4 problems
Interviewed by Thinkhat
56 views
0 comments
0 upvotes
Backend Developer
1 rounds | 1 problems
Interviewed by Thinkhat
60 views
0 comments
0 upvotes
Backend Developer
1 rounds | 1 problems
Interviewed by Thinkhat
54 views
0 comments
0 upvotes