cswork / libraryOpen practice workspace

Interview guides · Affinsys AI Private

Affinsys AI Private Software Engineer Interview Guide

Affinsys AI Private Software Engineer interview guide: reported rounds, questions and how candidates describe the process.

The 60-second brief

The Software Engineer role at Affinsys AI Private is a foundational position focused on building scalable, intelligent solutions within a high-growth startup environment. As part of a lean, agile team, you will be expected to contribute directly to product development, turning complex technical requirements into high-performance code. Your work will directly impact the company’s core offerings, requiring you to bridge the gap between theoretical computer science concepts and real-world application. This role is ideal for engineers who thrive in environments that value deep technical proficiency and clear, logical reasoning. You will work across the full development lifecycle, from participating in initial design discussions to implementing robust backend services and ensuring system integrity.

This guide is scoped to a Software Engineer candidate at Affinsys AI Private.

Focus areas

  • Python
  • Data Structures & Algorithms (DSA)
  • DBMS Fundamentals

The Affinsys AI Private interview process

Affinsys AI Private candidates report 3 rounds over 3-5 weeks. The stages below are what candidates describe, not a published process.

Online Assessment

Initial assessment to evaluate technical fundamentals, including coding, SQL, and core CSE concepts.

What to demonstrate

  • Initial assessment to evaluate technical fundamentals
  • Including coding, SQL, and core CSE concepts

How to prepare

  • Answer aloud and timed: What is the difference between TCP and UDP?
  • Answer aloud and timed: Can you explain the concept of a semaphore in Operating Systems?

Technical Interviews

Typically two interviews focusing on whiteboard-style problems and discussions about past projects.

What to demonstrate

  • Typically two interviews focusing on whiteboard-style problems and discussions about past projects
  • Depth in Python

How to prepare

  • Answer aloud and timed: What are the ACID properties in DBMS?
  • Answer aloud and timed: Explain the four levels of normalization in databases.

HR Interview

Final interview assessing psychological fit, reasoning skills, and approach to professional challenges.

What to demonstrate

  • Final interview assessing psychological fit, reasoning skills, and approach to professional challenges
  • Depth in Python

How to prepare

  • Answer aloud and timed: What is SQL injection, and how do you prevent it?
  • Answer aloud and timed: Solve problems involving Arrays, Strings, Maps, and Trees.

Where candidates lose points

Master your resume

Every item on your resume is fair game. If you list a technology, be prepared to explain it in depth.

Practice pseudocode

You may be asked to solve problems using pen and paper. Ensure your logic is sound even without a compiler.

Be ready for live coding

Practice solving DSA problems out loud. The interviewers want to hear your thought process, not just see the final code.

Stay calm

Interviewers at Affinsys AI Private are often described as calm and composed. Mirror this professionalism in your own responses.

Questions & practice

Solve problems involving Arrays, Strings, Maps, and Trees.

Medium · Coding & Problem Solving

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

How do you manipulate images using Numpy arrays?

Medium · Coding & Problem Solving

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

Write a function to check for a palindrome.

Medium · Coding & Problem Solving

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

Explain the difference between a list and a tuple in Python.

Medium · Coding & Problem Solving

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

Explain the four levels of normalization in databases.

Medium · Technical Fundamentals & CS Concepts

Approach

  1. Name the grain you start from and join outward from it.
  2. Check whether any join is one-to-many before aggregating, or the sums inflate.
  3. Say which index the query would use, and what makes it unusable.
  4. Handle the rows that do not match: that is usually the actual question.

Follow-up

  • How does the query change if that join becomes one-to-many?
  • What happens to this when the table is ten times larger?

What is SQL injection, and how do you prevent it?

Medium · Technical Fundamentals & CS Concepts

Approach

  1. Name the grain you start from and join outward from it.
  2. Check whether any join is one-to-many before aggregating, or the sums inflate.
  3. Say which index the query would use, and what makes it unusable.
  4. Handle the rows that do not match: that is usually the actual question.

Follow-up

  • How does the query change if that join becomes one-to-many?
  • What happens to this when the table is ten times larger?

What is the difference between TCP and UDP?

Medium · Technical Fundamentals & CS Concepts

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

Can you explain the concept of a semaphore in Operating Systems?

Medium · Technical Fundamentals & CS Concepts

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

What are the ACID properties in DBMS?

Medium · Technical Fundamentals & CS Concepts

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

What was the primary motive or business goal behind this project?

Medium · Project & Experience Deep-Dives

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

How are users authenticated in your backend implementation?

Medium · Project & Experience Deep-Dives

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

Walk me through the technical challenges you faced during this project.

Medium · Project & Experience Deep-Dives

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

One log partition stops advancing while the others drain

Easy · poison message · head-of-line blocking · consumer lag

Search results for a subset of tenants are hours stale; the rest are current. The projection consumer reports lag of zero on 15 of 16 partitions and 400,000 on one. Its error rate is flat and its CPU is idle. outbox_event has no pending rows older than a second, so the relay has published everything it holds. Identify the mechanism, give the ordered checks, and state what you do in the first ten minutes versus what you change permanently.

Approach

  1. Read the lag distribution first. A slow consumer lags everywhere; zero on fifteen partitions and 400,000 on one is not throughput. Idle CPU on the stuck partition means the consumer is not advancing its offset at all, which points at one message it cannot get past rather than at a rate problem.
  2. Exonerate the producer before touching the consumer. No pending outbox rows older than a second means the relay published, so the event exists in the log. This separates never sent from sent and never applied, which are different code paths and usually different owners.
  3. Read the message at the stuck offset and the handler's log lines for its event_id. A flat error rate with no progress has two explanations and you must distinguish them: the handler is throwing and the retry loop is swallowing it, or the handler is blocking on something and never returning. Idle CPU with no error lines favours the second.
  4. Mitigate before diagnosing further. Move the offending event to a dead-letter store and commit the offset past it. Adding consumers does nothing here, because a partition is consumed by exactly one member of the group, and the blast radius is every aggregate hashed to that partition, not only the aggregate that produced the bad event.

Follow-up

  • The dead-lettered event carried aggregate_version 7 and the projection had applied 6. What must the replay do differently if 8 and 9 landed in the meantime?
  • How do you show staleness to the user while the partition is behind, given the API already returns the projection's watermark?

Suggested practice checklist

Built from the rounds and topics Affinsys AI Private candidates report.

Day 1 — Map the Affinsys AI Private loop

  • Write out the reported sequence: Online Assessment, Technical Interviews, HR Interview.
  • For each round, write one sentence on what it is judging, from the description above, and mark the one you are least ready for.

Deliverable: A one-page map of the 3 reported rounds, with the weakest marked.

Day 2 — Work Python

  • Spend the session on Python, which Affinsys AI Private candidates report being tested on.
  • Write one worked example in Python and time yourself on it.

Deliverable: One timed worked example in Python.

Day 3 — Work Data Structures & Algorithms (DSA)

  • Spend the session on Data Structures & Algorithms (DSA), which Affinsys AI Private candidates report being tested on.
  • Write one worked example in Data Structures & Algorithms (DSA) and time yourself on it.

Deliverable: One timed worked example in Data Structures & Algorithms (DSA).

Day 4 — Work DBMS Fundamentals

  • Spend the session on DBMS Fundamentals, which Affinsys AI Private candidates report being tested on.
  • Write one worked example in DBMS Fundamentals and time yourself on it.

Deliverable: One timed worked example in DBMS Fundamentals.

Day 5 — Answer out loud: Technical Fundamentals & CS Concepts

  • Answer aloud, timed: What is the difference between TCP and UDP?
  • Answer aloud, timed: Can you explain the concept of a semaphore in Operating Systems?

Deliverable: Spoken answers to 2 reported Technical Fundamentals & CS Concepts question(s), under time.

Day 6 — Answer out loud: Coding & Problem Solving

  • Answer aloud, timed: Solve problems involving Arrays, Strings, Maps, and Trees.
  • Answer aloud, timed: How do you manipulate images using Numpy arrays?

Deliverable: Spoken answers to 2 reported Coding & Problem Solving question(s), under time.

Day 7 — Answer out loud: Project & Experience Deep-Dives

  • Answer aloud, timed: What was the primary motive or business goal behind this project?
  • Answer aloud, timed: How are users authenticated in your backend implementation?

Deliverable: Spoken answers to 2 reported Project & Experience Deep-Dives question(s), under time.

Behavioural preparation

Behavioural rounds judge the decision you made and what it cost.

Argue against a design, lose, and commit anyway

Medium · disagreement · service boundaries · decision records

Describe a design you argued against and lost. State the failure you predicted as a named mechanism, not a feeling about complexity: two services that would need one transaction, a projection with no rebuild path, a write path with no idempotency key. Say what evidence you brought, what the decision maker weighed instead, and what you did after the decision was made: what you instrumented, what you wrote down, and whether the prediction came true. Five minutes.

Approach

  1. State the prediction in falsifiable form up front: the mechanism, the condition that triggers it, and the observable outcome. A prediction that cannot be checked also cannot be credited to you later.
  2. Show the evidence you had at the time and label each piece honestly as measured, analogous, or intuition. Keeping the intuition is fine; disguising it as data is the thing that erodes your standing in the next argument.
  3. Represent the opposing case at full strength, including the constraint you did not control: a fixed date, a team boundary, or the fact that the decision was cheap to reverse and yours was not.
  4. Make disagree-and-commit concrete. Name the artefact you left behind so the prediction could be settled without you: the alert and its threshold, the counter on the dashboard, the decision note that recorded the trade-off and the condition that would revisit it.

Follow-up

  • What threshold on that alert would have proved you right, and did anyone ever look at it?
  • If the same proposal arrived tomorrow with the same deadline, would you argue it the same way?

Turn a code review disagreement into a decision

Easy · code review · optimistic concurrency · communication

A colleague's change updates a row with UPDATE resource SET version = version + 1 WHERE resource_id = $1 AND version = $2 and treats an affected-row count of zero as a successful no-op. You read that as a silently lost update; they think returning 200 is friendlier to clients than returning a conflict. Describe how you have handled a review disagreement of this shape: what goes in the comment, when you leave the thread, and who decides. Then write the comment you would leave here, in under 80 words.

Approach

  1. Sort the disagreement before writing anything. A silently discarded write is a correctness claim about data; the choice between 409 and 412 is taste. Only the first justifies blocking a merge, and saying which one you are doing is most of the value of the comment.
  2. Make the claim reproducible in the comment itself with an interleaving rather than a principle: A reads version 7, B reads version 7, B commits version 8, A's predicate matches zero rows, A is told it succeeded and A's edit is gone.
  3. Offer the alternative with its cost attached: return 409 carrying the current version and the revision that won, so the client can re-read and re-apply. Note that automatic retry is not the fix, because a retry re-reads the winner's state and reapplies an intent formed against data that no longer exists.
  4. Apply an escalation rule you can state: two round trips on the thread, then a call, and the service's owner decides rather than the reviewer. A reviewer who cannot be overruled is a bottleneck with extra steps.

Follow-up

  • Where would you put the test that fails if someone reintroduces the swallowed zero rowcount?
  • The author says clients cannot handle a 409. How do you check whether that is true?

Estimate work you have never done and defend the range

Hard · estimation · backfills · expand-contract

You are asked to estimate a change you have never attempted: add a column to a 100-million-row table, populate it, move reads across, and drop the old shape. Give a range with the assumptions that generate it, including batch size, the signal your backfill throttles on, and wall-clock hours, and name the three unknowns that would move the number most. Then describe a real estimate you gave under comparable ignorance: how you expressed its uncertainty, what you committed to, and how wrong you turned out to be.

Approach

  1. Decompose into independently deployable steps before estimating anything: add the column nullable, write both shapes, backfill in batches, verify, move reads, stop writing the old shape, drop it. That is four deploys spread over days, and the calendar estimate is dominated by them rather than by the loop's runtime.
  2. Do the arithmetic aloud for the part that has arithmetic in it: batch size times number of batches times per-batch duration, at a write rate the primary can absorb alongside roughly 1.2k writes per second of production traffic. The loop is throttled by replication lag and lock waits, not by how fast it can issue statements.
  3. Price the schema step by its lock rather than its statement duration. In PostgreSQL an ALTER TABLE taking ACCESS EXCLUSIVE waits for every open transaction on that table while later queries queue behind it, so a millisecond change issued during a thirty-second analytics query stalls that table for thirty seconds. Adding a nullable column with a non-volatile default avoids a rewrite from version 11; a new index wants CREATE INDEX CONCURRENTLY, which cannot run inside a transaction block and leaves an invalid index behind if it fails.
  4. Express the answer as a range whose endpoints each trace to a stated assumption, then name the cheapest experiment that collapses it, which is almost always running one real batch against the real table and multiplying.

Follow-up

  • How do you verify the backfill genuinely finished, given rows written by production traffic while it ran?
  • Where does the backfill resume from after a worker is killed mid-batch, and what makes that resume point trustworthy?