Interview guides · Baryons Software Solutions
Baryons Software Solutions Software Engineer Interview Guide
Baryons Software Solutions Software Engineer interview guide: aptitude screen, handwritten coding, Java and Spring Boot questions, and a 7-day plan.
The 60-second brief
Candidates describe Baryons Software Solutions as a company whose engineers build and maintain software applications, including solutions delivered to clients. The stacks reported for the role are .NET, PHP and Java, and the reported question set leans toward Java and Spring Boot, with some Python and SQL. Engineers in this role are described as working on backend logic, database changes such as schema updates, API integrations and business rules for client solutions, and as taking part in code reviews. For you, that means preparing fundamentals in one object-oriented language plus the ability to explain code you have already shipped.
This guide is for candidates applying for a Software Engineer position at Baryons Software Solutions. It covers the three reported rounds (Initial Screening, Technical Assessment, Technical Discussions), the fifteen reported questions with worked approaches, a seven-day plan that moves from aptitude and handwritten coding to Java, Spring Boot, SQL and project discussion, and the mistakes that cost candidates points on this kind of loop.
Candidates report three rounds over about 3-5 weeks: an aptitude-based Initial Screening, an in-person Technical Assessment where you write working code, and Technical Discussions about your past work and fit with the team.
Focus areas
- Java
- Core Java OOP (Classes, Abstraction, Encapsulation)
- Data Structures - Strings
Overview
The reported questions fall into three clusters. The first is handwritten coding: reversing the words in a string without built-ins, a palindrome check, sorting an array, counting one character in a string, and adding two time objects (hours and minutes). Candidates also mention converting a time to a 24-hour format and concatenating strings without library methods. These are short problems, so the work is in correctness on paper: empty input, null input, repeated spaces, minute overflow.
The second cluster is Java and object-oriented fundamentals: the four OOP pillars with examples, Java 8 features (streams, lambdas, functional interfaces), interface versus abstract class, exception handling and whitelabel error pages in Spring Boot, and Spring Boot Actuator. The third is general fundamentals: GET versus POST mapping, SQL joins, list versus tuple in Python, the basic architecture of a CPU, and frontend versus backend. Candidates report that OOP and basic data structures are often where technical conversations begin, so these answers need to be fluent and backed by an example from your own code.
Candidates also report that the résumé is the map for the technical conversations: every project you list can be explored for its architecture, its technologies and the problems you solved. Treat each project as a topic you must be able to defend, and prepare one concrete bug, one trade-off and one thing you would change for each. Since the stacks named are Java, C# or Python for the language, plus SQL and REST-style APIs, pick the language you will claim as your strongest and keep every code answer in it.
The Baryons Software Solutions interview process
Candidates describe a three-stage sequence that moves from an online aptitude filter to in-person coding and then to discussions of your own work.
Initial Screening
Candidates describe the Initial Screening as an aptitude test that filters on baseline logic, with math and verbal reasoning mentioned in the reported tips, and report that some early assessments are taken online through a test link. One reported tip is to confirm the link's logistics beforehand, including any browser mode such as incognito that you are told to use. Approach it as a separate skill from coding: it rewards steady practice on reasoning questions and a clean technical setup.
What to demonstrate
- Baseline logical reasoning through aptitude questions
- Math and verbal reasoning, which candidates name as the gate for this stage
- Readiness to complete an online assessment without technical delays
How to prepare
- Work through math and verbal reasoning practice sets on a regular schedule instead of one late session.
- Open the test link early, check the browser mode you are told to use, and confirm your connection and device.
- Keep your résumé and project notes close, because candidates report that later rounds draw on them.
Technical Assessment
Candidates describe the Technical Assessment as in-person, with a focus on writing functional code under time constraints, and report that you may have to write without an IDE's auto-complete, on paper or a whiteboard. This is the format where the coding-type questions are practised: strings, arrays, sorting and time arithmetic. Approach it by stating your plan before writing syntax, writing the loop logic yourself instead of calling library helpers, and walking through empty and null inputs before you say you are done.
What to demonstrate
- Working, syntactically correct code written by hand
- Handling of edge cases such as empty strings and null inputs
- Ability to explain why the code works, including memory use and efficiency
How to prepare
- Handwrite reverse-the-words, palindrome, character count, sort and add-two-times without built-ins, then trace each on paper with an empty, a one-element and a repeated-space input.
- Practise the reported scenarios of converting a time to 24-hour format and concatenating strings without library methods.
- For each solution, say its time and extra-space cost aloud, for example O(n) time and O(n) space for the word reversal.
Technical Discussions
Candidates describe Technical Discussions as conversations about past work and fit with the team, and report that the résumé drives them: architecture choices, the technologies used and the challenges overcome. They also report that OOP and basic data structures are often where technical discussions start. Approach it with a prepared account of each project and short, example-backed answers to the Java, Spring Boot, SQL and web-basics questions.
What to demonstrate
- Depth on the projects and technologies listed on your résumé
- Ability to explain technical decisions and trade-offs clearly
- Grasp of OOP, Java and Spring Boot concepts when applied to your own code
How to prepare
- For every project write its stack, its architecture in a few sentences, one problem you solved and one trade-off you made.
- Rehearse the OOP pillars with one running example, then interface versus abstract class, Java 8 features and Spring Boot error handling.
- Prepare to connect your answers to the wider application, for example how an API error response affects the clients that call it.
Where candidates lose points
Using split, reverse or other library calls in a question that says no built-in functions
Confirm what is allowed, then write the logic yourself: copy the characters into an array, scan from the end, collect each word, and join with a single space. State the cost (O(n) time, O(n) extra space) and trace it on a sample sentence.
Handwritten code that breaks on empty, null or oddly shaped input
Build an edge-case list for each coding question before you write: null and empty strings, one character, repeated or extra spaces, mixed case and punctuation in the palindrome check, a sorted or duplicate-heavy array, minutes that sum to 60 or more, hours that pass 24, and midnight in a 12-hour to 24-hour conversion.
Reciting OOP definitions without an example, or giving a one-line answer to interface versus abstract class
Pick one running domain, such as payments or vehicles, and show all four pillars in it. For interface versus abstract class, cover state, constructors, multiple implementation, default methods in Java 8, and when a shared base with state beats a pure contract.
Listing Java 8, Spring Boot or SQL on the résumé but being unable to write a stream pipeline, explain controller advice or write a join
Only claim what you can produce on paper: a map-filter-collect stream, a lambda against a functional interface, a @RestControllerAdvice with two handlers, and an inner join versus a left join with the unmatched rows explained.
Treating the aptitude screen and the test setup as an afterthought
Candidates describe the aptitude test as a gate before any coding. Practise math and verbal reasoning on a regular schedule and check the test link, browser mode and connection ahead of time.
Questions & practice
Write a program to reverse the words in a string without using built-in functions.
Medium · Coding and Logical Problem Solving
Approach
- Clarify the rules first: which built-ins are banned (split, reverse, StringBuilder.reverse), whether runs of spaces collapse to one, and whether leading or trailing spaces survive.
- Classic in-place answer on a char array: reverse the whole array, then walk it and reverse each word between space boundaries. Each character moves at most twice, so it is O(n) time and O(1) extra space beyond the char array (a Java String is immutable, so toCharArray already costs O(n)).
- Alternative: scan from the end, track each word's start and end index, and copy the characters into an output char array with one space between words. Also O(n), and collapsing extra spaces is easier this way.
- Never build the result with String += inside a loop in Java: every concatenation copies the string, so the total cost is O(n^2).
- Edge cases to test aloud: null, empty string, all spaces, a single word, and double spaces between words.
Follow-up
- Reverse the characters inside each word but keep the word order. What changes in your code?
- How would you handle punctuation attached to words, such as 'world!'?
- Can you collapse multiple spaces in place without a second array?
How do you check if a string is a palindrome?
Medium · Coding and Logical Problem Solving
Approach
- Two pointers: i starts at 0 and j at length-1. Compare charAt(i) with charAt(j), return false on the first mismatch, and move both inward while i < j. O(n) time, O(1) space, and the same loop handles odd and even lengths.
- Ask whether case and non-alphanumeric characters count. For phrases like 'A man, a plan, a canal: Panama', skip characters that fail Character.isLetterOrDigit and compare Character.toLowerCase of both sides.
- Mention the simpler reverse-and-compare version and its cost: it uses O(n) extra memory, and a recursive version uses O(n) stack.
- Edge cases: an empty string and a single character are palindromes, null needs a decision (throw or return false), and a string of only punctuation is a palindrome once it is filtered.
Follow-up
- Return true if the string becomes a palindrome after deleting at most one character.
- Find the longest palindromic substring. What is the complexity of expanding around each center?
- Check whether an integer is a palindrome without converting it to a string.
Write a program to sort an array in ascending order.
Medium · Coding and Logical Problem Solving
Approach
- Ask whether the library is allowed. In Java, Arrays.sort on a primitive array uses a dual-pivot quicksort, and on an object array a stable merge-based TimSort. If it is not allowed, say which algorithm you will write by hand and why.
- Simple hand-written options: insertion sort is O(n^2) worst case, stable, in place, and O(n) on already sorted input. Bubble and selection sort are also O(n^2) and easy to get right on paper.
- For O(n log n): merge sort is stable with O(n log n) worst case but needs O(n) extra space. Quicksort is in place and O(n log n) on average, but O(n^2) on sorted input with a first-element pivot. Heap sort is O(n log n) worst case, in place, and not stable.
- If the values sit in a small known range, counting sort runs in O(n + k).
- Trace your code on an empty array, one element, duplicates, negatives and an already sorted array before you say you are done.
Follow-up
- Is your sort stable, and when does stability matter?
- Sort an array of only 0s, 1s and 2s in a single pass.
- How would you sort data too large to fit in memory?
How do you calculate the number of occurrences of a specific character in a string?
Medium · Coding and Logical Problem Solving
Approach
- Single pass: loop over the indices, compare charAt(i) with the target, and increment a counter. O(n) time, O(1) space. Return 0 for an empty string and decide up front how null is handled.
- Ask whether the match is case-sensitive. If it is not, lower-case both sides once instead of calling equalsIgnoreCase on each character.
- Java 8 one-liner when built-ins are allowed: s.chars().filter(c -> c == target).count(). chars() returns an IntStream and count() returns a long.
- To count every character, use an int[26] or int[256] array indexed by the character for a fixed alphabet, or a HashMap<Character, Integer> otherwise. The array version avoids boxing and hashing.
- Unicode note: characters outside the Basic Multilingual Plane take two Java chars, so codePoints() is the correct stream for them.
Follow-up
- Find the first non-repeating character in the string.
- If the same string is queried for many different characters, what would you precompute?
- Count occurrences of a substring. Do overlapping matches count?
Implement a solution to add two time objects (hours and minutes).
Medium · Coding and Logical Problem Solving
Approach
- Model it as a class with int hours and int minutes, validate that minutes are 0-59 in the constructor, and write a method Time add(Time other) that returns a new object instead of changing either input.
- Normalise through total minutes: total = (h1 + h2) * 60 + m1 + m2, then hours = total / 60 and minutes = total % 60. This handles the carry, as in 1:45 + 0:30 = 2:15.
- Ask whether the result is a clock time or a duration. A clock time wraps with hours % 24 (23:30 + 1:45 = 01:15 the next day), while a duration keeps counting hours.
- Override toString with String.format("%02d:%02d", hours, minutes) so that 9:5 prints as 09:05. If subtraction is added later, use Math.floorMod, because % in Java can return a negative result.
- Mention the library route: java.time.LocalTime.plusHours and plusMinutes wrap around midnight, and Duration models a span. Then write it by hand if the interviewer asks.
Follow-up
- Convert a 12-hour time such as '07:05 PM' to 24-hour format. What do 12 AM and 12 PM become?
- Subtract one time from another, including the case that crosses midnight.
- Add a list of N times. Do you normalise after every addition or once at the end?
How do you perform basic SQL joins?
Medium · Technical Fundamentals and Database
Approach
- Use two concrete tables, employees and departments. INNER JOIN keeps only matching rows. LEFT JOIN keeps every employee and fills the department columns with NULL when there is no match. RIGHT JOIN mirrors that. FULL OUTER JOIN keeps both sides (MySQL lacks it, so emulate it with a UNION of a left and a right join).
- Anti-join: to find employees with no department, write a LEFT JOIN and filter WHERE d.id IS NULL, or use NOT EXISTS.
- Filter placement: a condition on the right table in WHERE removes the NULL rows and turns a LEFT JOIN into an inner join. Put that condition in the ON clause instead.
- Self join for employee and manager pairs from the same table. CROSS JOIN returns the Cartesian product, m times n rows.
- A one-to-many join repeats the left rows, which inflates SUM and COUNT. Aggregate in a subquery before joining, or use COUNT(DISTINCT). Index the join keys and check the plan with EXPLAIN.
Follow-up
- Find the highest-paid employee in each department.
- What is the difference between WHERE and HAVING?
- A join on two large tables is slow. What do you check first?
Replace offset paging on the resource feed with keyset
Easy · keyset pagination · composite index · sort order
resource holds resource_id, tenant_id, owner_user_id, title, body_ref, version, status ('draft','active','archived','deleted'), created_at, updated_at, deleted_at, with an index on (tenant_id, status, updated_at DESC, resource_id DESC). The listing endpoint returns active resources for one tenant, newest update first, 50 per page, today with LIMIT 50 OFFSET n. Tenants reach page 400 and rows are created while they read. Write the keyset query, define what the cursor carries and how it is encoded, and say which part of the index each predicate uses. Assume PostgreSQL 16.
Approach
- Name the two failures separately. OFFSET 20000 makes the server produce and discard 20,000 rows, so page cost grows with depth rather than with page size. Independently, any write that changes how many rows sort above the offset moves the window between two fetches, and the direction decides which anomaly you get: an insert lands at the head of updated_at DESC and pushes already-returned rows down past the boundary, so they are returned a second time; a delete above the offset, or a row whose updated_at is bumped above the cursor, pulls rows up and one is never returned at all. Nothing in the response reveals either.
- Write the seek: WHERE tenant_id = $1 AND status = 'active' AND (updated_at, resource_id) < ($2, $3) ORDER BY updated_at DESC, resource_id DESC LIMIT 50. The row-value comparison is one index range rather than a disjunction, and both columns are NOT NULL, which is what makes that comparison well defined.
- Map each predicate onto the index: tenant_id and status are equality on the leading columns, (updated_at, resource_id) is the range, and the ORDER BY matches the index order so no Sort node appears and the scan stops after 50 rows. The DESC in the definition only matters for mixed directions — a plain ascending btree on the same columns is read backwards for this query.
- Put both sort columns in the cursor and nothing the client can tamper with into another tenant: base64 of (updated_at, resource_id), validated server-side, with tenant_id taken from the principal.
Follow-up
- The client asks for 'jump to page 400'. What do you offer instead, and what does the honest version cost?
- Sort order becomes user-selectable across four columns. How many indexes is that, and which would you refuse to add?
Explain the core pillars of OOP (Inheritance, Polymorphism, Abstraction, Encapsulation) with real-world exampl
Medium · Java and Object-Oriented Programming (OO
Explain the core pillars of OOP (Inheritance, Polymorphism, Abstraction, Encapsulation) with real-world examples.
Approach
- Encapsulation: private state that can only change through methods that protect an invariant. Example: a BankAccount with a private balance whose withdraw() rejects an overdraft. Getters and setters on every field are not encapsulation.
- Abstraction: callers depend on what something does, not how it does it. Example: a PaymentProcessor interface with pay(amount), where the caller never knows whether a card or a wallet implementation runs.
- Inheritance: an is-a relationship that reuses and overrides behaviour, such as Vehicle and Car. In Java a class extends only one class but can implement many interfaces. When the relationship is has-a, composition is the better choice.
- Polymorphism: compile-time through method overloading, and runtime through overriding with dynamic dispatch. With Shape s = new Circle(), s.area() runs Circle's version.
- Take at least one example from your own project code rather than only textbook animals or shapes.
Follow-up
- What are the rules for overriding versus overloading? Can a static method be overridden?
- When would you choose composition over inheritance? Give an example where inheritance caused trouble.
- What is the difference between abstraction and encapsulation?
What are the key features introduced in Java 8 (e.g., Streams, Lambda expressions, functional interfaces)?
Medium · Java and Object-Oriented Programming (OO
Approach
- Lambdas and functional interfaces: a functional interface has exactly one abstract method (@FunctionalInterface checks this). Name the java.util.function types Predicate, Function, Consumer and Supplier, plus method references such as String::length.
- Streams: a source, then lazy intermediate operations (filter, map, sorted), then a terminal operation (collect, reduce, forEach) that runs the pipeline. A stream cannot be reused once consumed. Show Collectors.groupingBy as an example.
- Optional for values that may be absent. Point out that orElse evaluates its argument every time, while orElseGet calls its Supplier only when the value is empty.
- Default and static methods in interfaces. Defaults let Java add stream() to Collection without breaking existing implementations.
- The java.time API (LocalDate, LocalDateTime, Duration) is immutable and thread-safe, and replaces Date and Calendar. CompletableFuture and Metaspace (which replaced PermGen) are also worth naming.
Follow-up
- What is the difference between map and flatMap? Give an example of each.
- Write a stream that counts employees per department.
- Why must local variables used inside a lambda be effectively final?
What is the difference between an interface and an abstract class?
Medium · Java and Object-Oriented Programming (OO
Approach
- Abstract class: it can have instance fields, constructors, protected or private members, and a mix of abstract and concrete methods. A class can extend only one.
- Interface: fields are implicitly public static final, so it holds no instance state. Since Java 8 it can have default and static methods, and since Java 9 private methods. A class can implement many interfaces.
- When to use which: an interface for a capability shared by unrelated types (Comparable, Runnable), and an abstract class for a family that shares code and state, as in the template method pattern (AbstractList is the JDK example).
- Diamond case: if two interfaces supply the same default method, the implementing class must override it and can pick one with InterfaceName.super.method().
- Interface methods without a body are implicitly public and abstract, so an implementation cannot narrow their visibility.
Follow-up
- Now that interfaces have default methods, why do abstract classes still exist?
- Can an abstract class have no abstract methods? Why would you write one?
- Can an interface extend more than one interface?
Explain the role of Spring Boot Actuators and how they assist in monitoring.
Medium · Java and Object-Oriented Programming (OO
Approach
- Adding spring-boot-starter-actuator exposes operational endpoints under /actuator, such as health, info, metrics, loggers, env, beans, mappings, threaddump and heapdump.
- Exposure is configuration: recent Spring Boot versions expose only health over HTTP by default, and management.endpoints.web.exposure.include adds others. A separate management.server.port keeps them off the public port.
- Health: /actuator/health combines indicators (database, disk space, Redis and so on) into UP or DOWN. You can add a custom HealthIndicator bean, and liveness and readiness groups serve Kubernetes probes.
- Metrics through Micrometer: JVM memory, GC, thread counts and the http.server.requests timer. Add micrometer-registry-prometheus for a /actuator/prometheus endpoint that Prometheus scrapes and Grafana charts.
- Security: env and heapdump can leak secrets. Expose the minimum and put the rest behind Spring Security. A POST to the loggers endpoint changes a log level at runtime without a restart.
Follow-up
- Write a custom health indicator for a downstream API the service depends on.
- How would you add a business metric such as orders placed per minute?
- Which endpoints would you never expose publicly, and why?
What is the difference between GET and POST mapping in web development?
Medium · Technical Fundamentals and Database
Approach
- In Spring, @GetMapping and @PostMapping are shortcuts for @RequestMapping with method GET or POST. The question is really about HTTP semantics.
- GET reads data. Inputs go in the path or query string (@PathVariable, @RequestParam). It is safe and idempotent, responses can be cached and bookmarked, and URL length is limited by browsers and servers.
- POST creates data or submits commands. Input goes in the body, usually JSON bound with @RequestBody through Jackson and checked with @Valid. It is not idempotent, so a retried request can create a duplicate.
- Security: GET parameters end up in server logs and browser history, so secrets never go there. POST is no more secure on the wire: only HTTPS encrypts either one.
- Response codes: 200 for a successful GET, 201 Created with a Location header when a POST creates a resource, 400 for a validation failure. Mention PUT (idempotent replace), PATCH (partial update) and DELETE to round out the answer.
Follow-up
- How would you make POST retries safe, for example with an idempotency key?
- What is the difference between @RequestParam and @PathVariable?
- Why is a GET request with a body a bad idea?
Explain the difference between a list and a tuple in Python.
Medium · Technical Fundamentals and Database
Approach
- A list is mutable (append, pop, item assignment) and a tuple is immutable. But a tuple that holds a list can still change through that list, because immutability is shallow.
- Hashability: a tuple is hashable when all its elements are, so it can be a dict key or a set member. A list never can be.
- Performance: both index in O(1). A list over-allocates so that append is amortised O(1), which makes it slightly larger in memory, and CPython can fold constant tuples at compile time.
- Use a tuple for a fixed record of mixed fields, such as a coordinate or several return values (namedtuple adds field names), and a list for a collection of similar items that grows or shrinks.
- Syntax trap: (1) is an int and (1,) is a one-element tuple.
Follow-up
- What happens if you use a tuple containing a list as a dict key?
- After t += (4,), is t the same object? How would you check?
- When would you choose a namedtuple or a dataclass over a plain tuple?
Describe the basic architecture of a CPU and the role of a processor.
Medium · Technical Fundamentals and Database
Approach
- Name the parts: the control unit (fetches, decodes and sequences instructions), the ALU (arithmetic and logic), registers (program counter, instruction register, general-purpose), and the L1/L2/L3 caches. The address, data and control buses connect them to main memory. In the von Neumann model, instructions and data share that memory.
- Walk the fetch-decode-execute cycle: the program counter gives the address, the instruction is loaded into the instruction register and decoded, the ALU or a memory unit executes it, the result is written back, and the PC advances or jumps on a branch.
- Performance factors: clock rate, instructions per cycle, pipelining (and the branch mispredictions that stall it), number of cores, and the memory hierarchy, where each level from registers to cache to RAM to disk is slower and larger.
- Terms: a processor chip can hold several cores, and SMT (hyper-threading) runs two hardware threads per core.
- Tie it to code: traversing a 2D array row by row in Java or C uses the cache much better than going column by column, because each row is contiguous in memory.
Follow-up
- What is the difference between a process and a thread?
- What is a cache miss, and why does array traversal order change running time?
- What changes between a 32-bit and a 64-bit processor?
What are the primary differences between frontend and backend development?
Medium · Technical Fundamentals and Database
Approach
- The frontend runs on the user's device: HTML, CSS and JavaScript, usually with a framework. Its concerns are rendering, UI state, responsiveness, accessibility and browser differences.
- The backend runs on servers: business logic, authentication, APIs and database access. The stacks candidates list for this role are Java with Spring Boot, .NET and PHP.
- The contract between them is usually a REST API over HTTP carrying JSON. Validation must also run on the server, because any client-side check can be bypassed.
- Performance differs too. The frontend cares about bundle size and render time, the backend about throughput, query latency and concurrency.
- Close by tracing one request from your own project: a button click, the HTTP call, the controller, the query, and the response rendered back on screen.
Follow-up
- What is CORS, and why does the browser enforce it?
- How do server-side and client-side rendering differ?
- Where would you validate a form input, and why in both places?
p99 jumped on one listing filter while p50 stayed flat
Medium · query planning · composite index · percentiles
After a release that added an owner_user_id filter to the resource listing, p99 rose from 90 ms to 1.9 s while p50 stayed at 40 ms. Traffic and row counts are unchanged. resource carries the index (tenant_id, status, updated_at DESC, resource_id DESC). The new query filters tenant_id and owner_user_id, orders by updated_at DESC, resource_id DESC, and takes 20 rows. On PostgreSQL, explain the shape of the regression, prove it from a query plan, and give the index you would add.
Approach
- Start from the shape. A flat p50 with a moved p99 means a subset of requests changed cost, not all of them, so the first job is naming the subset. Bucket the endpoint's latency by the tenant's row count; the natural hypothesis is that large tenants are a small share of requests and all of the tail.
- Get the plan for the new query on a large tenant with EXPLAIN (ANALYZE, BUFFERS). Expect an index scan over the tenant's range, a filter discarding most of it, then a Sort feeding the Limit, possibly reporting Sort Method: external merge Disk. Read actual rows on the scan node, not estimated.
- Explain why the existing index cannot serve it. A composite B-tree is seekable only as a left prefix, and with no equality predicate on status the scan cannot treat updated_at as an ordering, because rows in the tenant's range are ordered by status first. Everything matching must be read and sorted before LIMIT 20 can apply, so a tenant with 400,000 rows pays 400,000 rows to return 20.
- Add (tenant_id, owner_user_id, updated_at DESC, resource_id DESC). Equality on the first two columns leaves the index ordered by updated_at within that pair, so the plan becomes an index scan that stops after 20 rows with no Sort node. PostgreSQL can scan a B-tree backwards, so the DESC markers matter only if the two sort columns ever disagree in direction; keeping them explicit documents the order the keyset cursor depends on.
Follow-up
- The endpoint paginates with OFFSET. What does page 500 cost with your index, and what does the keyset version cost?
- How would you have caught this before release, given that a 10,000-row seed database produces the same plan shape at an unnoticeable cost?
Suggested practice checklist
The plan follows the reported loop: the aptitude screen first, then handwritten coding, Java and OOP, Spring Boot and web basics, SQL and general fundamentals, and finally project discussion with a full mixed session.
Day 1 — Aptitude screen and loop map
- Write out the three reported rounds and, for each, the kind of work it needs: online reasoning, handwritten code, spoken discussion of past work.
- Do a set of math and verbal reasoning practice questions and list the question types where you were slowest.
- Check the logistics a test link might need: browser mode, connection, a quiet space.
Deliverable: A one-page loop map, a scored aptitude practice set and a list of your slowest question types.
Day 2 — Strings by hand
- On paper, in your strongest language, write the word reversal without built-ins, the palindrome check and the character count.
- Add a table of edge cases for each (empty, null, one character, repeated spaces, mixed case) and trace your code on them.
- Write string concatenation without library methods and state its cost.
Deliverable: Handwritten string solutions with an edge-case trace table and the time and space cost beside each.
Day 3 — Sorting and time arithmetic
- Write insertion sort and one O(n log n) sort (merge sort or quicksort) by hand and say when each is the better choice.
- Write add-two-times with carry from minutes to hours and a wrap at 24 hours, then the 12-hour to 24-hour conversion.
- Trace each solution on a boundary case such as 59 plus 1 minutes and midnight.
Deliverable: Handwritten sort and time solutions with traced boundary cases.
Day 4 — OOP and modern Java
- Write one running example (for instance a payment or vehicle hierarchy) that shows inheritance, polymorphism, abstraction and encapsulation in code.
- Make a comparison of interface versus abstract class covering state, constructors, default methods and when to choose each.
- Write short snippets for Java 8 streams, lambdas, functional interfaces and Optional.
Deliverable: A runnable OOP example, an interface-versus-abstract-class comparison and a Java 8 snippet sheet.
Day 5 — Spring Boot and web basics
- Build a small controller with a @RestControllerAdvice that maps a not-found, a validation failure and a generic exception to different statuses, and disable the whitelabel page.
- Enable Actuator, list the endpoints you expose and say which you would keep private.
- Write GET versus POST mapping examples and say what each means for idempotency, caching and request body.
Deliverable: A small Spring Boot project with global error handling and Actuator, plus a one-paragraph GET versus POST answer.
Day 6 — SQL and computing fundamentals
- Create two small tables and write inner, left, right and full joins, noting which rows each keeps.
- Write answers for list versus tuple in Python, the parts of a CPU, and frontend versus backend responsibilities.
Deliverable: A join cheat sheet with outputs, three short spoken-answer outlines, and a solved keyset-paging exercise.
Day 7 — Project walkthrough and mixed session
- For each project on your résumé write its stack, architecture, one problem solved and one trade-off.
- Rehearse the error-handling answer as a story about a real service of yours, then speak through one project end to end.
- Finish with a mixed paper session: one string question, one time question, one OOP answer and one SQL join.
Deliverable: One project sheet per résumé project and a completed mixed paper session with gaps marked.
Project discussion preparation
Candidates report that the Technical Discussions round centres on your past work and your fit with the team, and that your résumé is the map for it. Expect to explain architecture choices, technologies and the challenges you overcame in your projects. Prepare concrete accounts with decisions and trade-offs, not summaries.
- Walk me through a project on your résumé: its architecture, the technologies you used and one problem you solved in it.
- Describe a technical decision in one of your projects and the trade-off you accepted.
- Tell me about a bug in your own code that you found late, how you traced it and what you changed afterwards.
- Describe a code review where you disagreed with a teammate about an approach and how it was settled.
How do you handle exceptions and white-label errors in Spring Boot?
Medium · Java and Object-Oriented Programming (OO
Approach
- Treat it as a technical Spring Boot question that is filed under behavioral. Answer in two layers: first the mechanism, then a real case where you applied it. If you are asked for a story instead, use Situation, Action, Result around an actual API where unhandled errors reached clients, and spend most of the time on what you changed and how you checked it.
- Explain the whitelabel page first. With no handler for a failure, Spring Boot forwards to /error, served by BasicErrorController: an HTML Whitelabel Error Page for browsers, a JSON body (timestamp, status, error, path) for other clients. Turn it off with server.error.whitelabel.enabled=false, add templates/error/404.html, or register your own ErrorController; server.error.include-message and include-stacktrace control detail.
- Then the design. Put @ExceptionHandler methods in a @RestControllerAdvice class and map exceptions to statuses: a custom not-found exception to 404, a duplicate to 409, MethodArgumentNotValidException from @Valid to 400 with field errors, a catch-all to 500 with a generic message. Return one body shape (status, code, message, timestamp, path), or ProblemDetail on Spring 6 and Boot 3. ResponseEntityExceptionHandler covers built-in MVC exceptions.
- State the trade-offs. Central advice keeps controllers clean and responses uniform; @ResponseStatus or ResponseStatusException suits one-off cases. Log the stack trace once on the server, and never return stack traces, SQL messages or class names to the client. Unchecked exceptions roll back a @Transactional method by default; checked ones only with rollbackFor.
- Name the edge cases: an exception thrown in a servlet filter happens before the DispatcherServlet, so controller advice does not see it and it falls through to /error; an unmatched URL produces a 404 through the same error path; a handler that itself throws hides the original failure. Mention MockMvc tests asserting status code and body.
Follow-up
- An exception is thrown inside a security or logging filter. Why does your @RestControllerAdvice not catch it, and where does the response come from?
- How do you return field-level validation errors for a request body annotated with @Valid, and which exception does Spring raise?
- What is the difference between an @ExceptionHandler inside one controller and one inside @ControllerAdvice, and when would you choose each?
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
- 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.
- 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.
- 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.
- 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?
Narrate an outage you owned from page to postmortem
Hard · incident response · blast radius · postmortems
Pick an incident you personally drove, ideally one where writes were affected rather than reads. In six to eight minutes: state the symptom as it first appeared on a dashboard, the blast radius you established before you knew the cause, the mitigation you applied and when, the mechanism you eventually proved, and the follow-up that would prevent a repeat. Bring numbers: error rate, tenants affected, minutes to mitigate, minutes to resolve. If you cannot name what you measured, choose a different incident.
Approach
- Open on the signal rather than the cause: which metric at which percentile moved, on which service, at what time, so the listener follows the same evidence you had rather than a conclusion you already reached.
- Separate mitigation from diagnosis out loud. State what you did to stop the bleeding (flag off, shed traffic, drain a lease, roll back a deploy) and say plainly that you did it before the mechanism was known, because those are two jobs with different deadlines.
- Establish blast radius in countable terms: how many tenants, how many writes, and crucially whether the effect was loss or only delay. An append-only revision table or a pending outbox row means the change survived and the projection was merely behind, which is a repair rather than a data-loss incident.
- Prove the mechanism instead of asserting it. Name the trace span that grew, the plan that flipped to a sequential scan, the lease that expired, plus one alternative you ruled out and the signal that stayed flat while you ruled it out.
Follow-up
- What would you do differently in the first five minutes, given the same dashboard and no more information?
- Which follow-up action did you deliberately not take, and why was dropping it the right call?