IDFC First Bank - Chennai

Location
Chennai
Posted
9 Aug 2026
83 reads

Summary

I was asked to solve a House Robber variant with limited adjacency during an interview at IDFC First Bank in Chennai.

How it went

House Robber with Limited Adjacency (Circular)

Problem Statement

You are given an integer array nums where each element represents the amount of money in a house. The houses are arranged in a circle, meaning the first and last houses are adjacent.

You want to maximize the total amount of money you can rob under the following constraints:

Constraints

  • You cannot rob more than two consecutive houses (i.e., picking 3 consecutive houses is not allowed).
  • You can rob adjacent houses at most once. Across the entire selection, there can be at most one pair of adjacent houses.
  • Since the houses are in a circle, house 0 and house n‑1 are also considered adjacent.

Goal

Return the maximum amount of money you can rob without violating the above constraints.

Questions asked (1)

  1. 01

    House Robber with Limited Adjacency (Circular)

    Data Structures & Algorithms

    You are given an integer array nums where each element represents the amount of money in a house. The houses are arranged in a circle, meaning the first and last houses are adjacent.

    Constraints:

    • You cannot rob more than two consecutive houses (picking three consecutive houses is not allowed).
    • You can rob adjacent houses at most once; there can be at most one pair of adjacent houses in the selection.
    • House 0 and house n‑1 are considered adjacent due to the circular arrangement.

    Return the maximum amount of money you can rob without violating these constraints.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Idfc First Bank recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!