cswork / libraryOpen practice workspace

Interview guides · Cisco Restaurant + Bar

Cisco Restaurant + Bar Software Engineer Interview Guide

Cisco Restaurant + Bar Software Engineer interview guide: networking and OS fundamentals, coding, design and behavioral questions, plus a 7-day prep plan.

The 60-second brief

Candidate reports describe the engineering work as infrastructure software: networking protocols, cloud platforms, real-time data streaming, web applications and backend services. Real-time communication services, enterprise platform tools and distributed applications are named as the systems that depend on that code. Reported examples of day-to-day tasks include packet processing, API design, object-oriented code, data pipelines, internal tooling, low-level drivers and cloud-native deployments. Depending on the team, the role is described as backend APIs, user interfaces or low-level network components, surrounded by code review, sprint planning, test suites, CI/CD, documentation, log analysis, profiling and query tuning. Which of those you would do depends on the team, so ask the recruiter which one the loop is for before you decide where to spend your preparation.

This guide is for candidates interviewing for a Software Engineer position at Cisco Restaurant + Bar, from university-graduate level to experienced hires, since reports describe both. It covers the three reported stages, all twenty reported questions grouped into networking and CS fundamentals, data structures and algorithms, architecture and systems development, and project and behavioral deep dives, plus the mistakes that cost candidates points and a seven-day plan. It does not cover pay.

Candidates report three rounds over about 3-5 weeks: Initial Screening, Technical Interviews, and a Managerial or HR Round. Another description of the process gives two to four weeks, so confirm scheduling with your recruiter.

Focus areas

  • Java
  • Data Structures & Algorithms (DSA)
  • Networking Fundamentals

Overview

The reported questions fall into four groups of five. Networking and CS fundamentals cover IP subnetting with a membership check, TCP versus UDP, the packet flow with ARP, DNS and DHCP when a host contacts a web server, Linux memory management and scheduling, and bit manipulation. The coding group is an LRU cache, singly linked list reversal, Two-Sum variations, BFS and DFS, and bracket validation. The architecture group covers an order-processing REST API or microservice, OOP and design patterns, the internals of hash maps and red-black trees in the C++ STL or Java Collections, multithreading and synchronization, and low-level design for reusable libraries. The last group is project and behavioral deep dives. Candidates also report scenarios such as troubleshooting a client that cannot reach a backend, parsing an address and mask into network, broadcast and host range, top-K frequent elements from a stream of logs, designing a backend that ingests logs from many edge devices, and microservices for order state transitions.

What this means for preparation: the fundamentals questions are low-level. Be ready to go below the layer names and talk about header fields, which address changes at each hop, what a page fault does, and what the scheduler decides. Two of them also ask for code (the subnet membership check and the bit functions), so practise explaining the concept and then writing it with tests. The listed command-line tools for network troubleshooting are nslookup, ping, traceroute, netstat and tcpdump, so know what each one proves when it succeeds or fails.

On language: candidates report that Python, Java, C++, C or JavaScript are all acceptable, and the topic tags on reported questions point to Java and Python. Choose the language where you write correct code fastest, then learn how its standard library implements maps, because the question about STL and Java Collections internals expects specifics such as buckets, load factor, resizing and ordered trees. Cloud platforms, Docker, Kubernetes, CI/CD and web frameworks are listed as nice-to-have, so they should not displace practice on subnets, sockets and linked lists.

The project deep dive and production-bug questions are about your own work. Pick one or two CV projects and prepare the architecture, the stack choices, what you personally wrote, and one failure with its root cause. Candidates report a tip to keep answers on personal technical contributions rather than team-level summaries.

The Cisco Restaurant + Bar interview process

Candidates describe three stages. The order below is the reported one, and the depth of technical questioning is said to shift with the team's domain, such as embedded, full-stack or backend infrastructure.

Initial Screening

Candidates describe this first stage as a check on fit for the role. A longer description of the process mentions a resume screen followed by an online assessment or a phone screen with a technical recruiter. No question list is reported for it, so treat it as a short test of whether your background matches the requirements candidates describe: one main language, data structures and algorithms, networking and operating-system basics, and Git. Go in with a short pitch and with logistics questions ready, and keep one or two easy-to-medium coding problems fresh in case an online assessment is part of your loop.

What to demonstrate

  • Fit between your background and the listed requirements: a main programming language, data structures and algorithms, networking and OS fundamentals, Git
  • How clearly you describe your experience and your reasons for applying
  • Basic problem-solving, if an online assessment or phone screen includes coding

How to prepare

  • Write a short pitch that links two projects to the listed requirements, naming the language you used and what you personally built
  • Ask the recruiter which team and domain the loop is for, whether an online assessment is included, and which languages are allowed
  • Re-solve the bracket-validation and Two-Sum problems from memory in your chosen language, including the empty-input and duplicate-value cases

Technical Interviews

Candidates report several technical interviews. They are described as covering core computer science concepts, live coding, deep dives into resume projects and system architecture, with depth adjusted to the team's domain. The reported questions behind those areas are subnetting, TCP versus UDP, packet flow, Linux memory and scheduling, bit manipulation, the LRU cache, list reversal, Two-Sum, BFS and DFS, bracket validation, the order-processing API, OOP, library internals, multithreading and low-level design. Prepare by practising each type in its own format: spoken explanation for fundamentals, runnable code with tests for coding, and a requirements-first outline for design.

What to demonstrate

  • Understanding of networking and operating-system behaviour below the abstraction layer
  • Working, tested code with stated time and space complexity
  • Architecture reasoning: components, data store choice, failure handling
  • Ownership and technical decisions in the projects on your CV

How to prepare

  • Rehearse the host-to-web-server packet flow in order: DHCP lease, ARP for the gateway, DNS lookup, TCP handshake, then the request, and say which header fields change at each router
  • Write the LRU cache with a hash map and doubly linked list, the iterative list reversal, and the one-pass Two-Sum, each with tests for empty, single-element and duplicate inputs
  • Prepare one outline for the order-processing service covering resources, state transitions, idempotent retries and the database you would pick, and one example of a design pattern you actually used
  • Learn how your language's hash map and ordered map are built, and how you would prevent a deadlock between two locks

Managerial or HR Round

Candidates report a final conversation with a manager or HR, described as covering leadership competencies, career goals and team fit. The reported behavioral prompts are about adapting to changing requirements or tight deadlines, handling technical disagreements about architecture, and why you want this Software Engineer role and how your experience aligns. Prepare three or four STAR stories with a clear personal decision in each, and a motivation answer built from the work candidates describe rather than from generic enthusiasm.

What to demonstrate

  • Ownership of deliverables and how you worked with product, QA and DevOps colleagues, as the reported competencies describe
  • Adaptability when requirements or priorities shift
  • Reasons for applying and career direction

How to prepare

  • Write STAR outlines for a late requirement change, an architecture disagreement and a production bug, using I for every action you took
  • Write a two-part answer to why you want this role: one concrete piece of the described work that interests you, then two requirements you can match with evidence
  • Prepare questions about the team's domain and how the technical rounds relate to that work

Where candidates lose points

Describing packet flow or TCP versus UDP with layer names only, without the concrete sequence

Practise the order a host follows: DHCP lease, ARP for the gateway's MAC, DNS query, SYN, SYN-ACK, ACK, then the request, noting that MAC addresses are rewritten at each hop while IP addresses stay. Capture your own page load with tcpdump once and annotate it.

Writing the subnet membership check by comparing strings or octets, then missing prefix edge cases and malformed input

Convert the address and mask to 32-bit integers and compare (ip & mask) with (network & mask). Test /0, /32, an octet above 255 and a mask with non-contiguous bits, and use the same helper to produce network, broadcast and host range.

Pointer and bookkeeping bugs in the LRU cache, list reversal and BFS or DFS cycle detection: updating an existing key without moving it, losing the next pointer, or never marking nodes visited

Use a hash map plus doubly linked list with sentinel nodes for the cache, trace prev, current and next by hand on zero, one and two nodes before running the reversal, and keep a visited set in graph traversal, using a recursion-stack set for directed cycles.

Answering the multithreading question with a list of primitives and no failure scenario

Give the two-lock deadlock example, name the four conditions it needs, and show the fix by acquiring locks in a fixed global order. Show a lost-update race on a shared counter and fix it with a lock or an atomic. Say what you would do about contention.

Treating the project deep dive and production-bug prompts as team summaries: no personal decision, no root cause, no prevention

For each CV project, prepare the architecture, the alternative you rejected and why, what you wrote yourself, and one incident with the symptom, how you narrowed it, the cause, the fix and the guard you added afterwards.

Questions & practice

Describe memory management, virtual memory, and process scheduling concepts within Linux operating systems.

Medium · Networking & Computer Science Fundamenta

Approach

  1. Virtual memory: each process gets its own address space, split into pages (typically 4 KiB). The MMU maps them to physical frames through multi-level page tables and caches translations in the TLB. A minor page fault only fills in a mapping; a major fault needs disk I/O.
  2. Lay out a process's memory: text, data, bss, heap, mmap region and stack. glibc malloc grows the heap with brk for small requests and uses mmap for large ones (128 KiB threshold by default). Pages are allocated lazily on first touch, and fork shares pages copy-on-write.
  3. Memory pressure: Linux overcommits by default, reclaims page cache and swaps through kswapd, and runs the OOM killer as a last resort. Know RSS versus VSZ and where to look: /proc/<pid>/maps, free, vmstat, top.
  4. Scheduling: threads and processes are both tasks (threads share the address space via clone flags). For normal tasks, CFS kept tasks in a red-black tree ordered by virtual runtime weighted by nice value; since kernel 6.6 EEVDF replaced it. SCHED_FIFO and SCHED_RR real-time classes always run ahead of normal tasks.
  5. Context switches cost a register save, a scheduler decision and cache/TLB disruption. Switching between threads of the same process is cheaper because the address space does not change. Connect each concept to a symptom you could diagnose.

Follow-up

  • Walk through what happens in memory on fork followed by exec.
  • Why can malloc succeed and the process still be killed later for lack of memory?
  • What is thrashing, and how would you spot it on a running box?

Implement an in-memory LRU (Least Recently Used) cache from scratch using standard data structures.

Medium · Data Structures & Algorithms

Approach

  1. Combine a hash map from key to node with a doubly linked list ordered by recency, using sentinel head and tail nodes so insert and unlink never special-case an empty list. Every node stores its key so eviction can delete the map entry.
  2. get: on a miss return -1 or null. On a hit, unlink the node, move it to the front and return its value. put: if the key exists, update the value and move it to the front. Otherwise insert at the front, and if the size exceeds capacity, evict tail.prev and remove its key from the map.
  3. Complexity: O(1) per operation and O(capacity) space. Say why both structures are needed: the map alone cannot order entries by use, and the list alone needs O(n) search.
  4. Edge cases: capacity 0, a put on an existing key (must not evict anything), and the same key read repeatedly. Write small unlink and addToFront helpers so pointer updates live in one place, then trace a capacity-2 example.
  5. Mention the library shortcuts and their limits: Java LinkedHashMap with accessOrder=true and removeEldestEntry overridden, or Python OrderedDict with move_to_end and popitem(last=False). Implement it by hand if asked to build it from scratch.

Follow-up

  • Make it thread-safe. Why does get also need exclusive access?
  • How would you add per-entry TTL expiry?
  • How would you implement LFU eviction in O(1)?

Write a function to reverse a singly linked list in-place and discuss edge cases for single-node and null inpu

Medium · Data Structures & Algorithms

Write a function to reverse a singly linked list in-place and discuss edge cases for single-node and null inputs.

Approach

  1. Iterative reversal with three pointers: prev = null, curr = head. Loop while curr is not null: save next = curr.next, set curr.next = prev, then prev = curr and curr = next. Return prev. O(n) time, O(1) extra space.
  2. Walk the edge cases the question names. A null head returns null without entering the loop. A single node returns itself with next still null. Then trace two nodes to show the old head ends with next = null because prev starts as null.
  3. Recursive version: reverse the rest, then set head.next.next = head and head.next = null, and return the new head. Its O(n) call stack can overflow on long lists, which is the reason to prefer the iterative form.
  4. Check the result by walking the reversed list: the length is unchanged and the values come out in reverse order. A common bug is losing the rest of the list by overwriting curr.next before saving it.

Follow-up

  • Reverse the nodes in groups of k, leaving a short final group as it is.
  • Reverse only the sublist between positions m and n.
  • What happens if the input list contains a cycle, and how would you detect one first?

Given an array of integers, solve variations of the Two-Sum problem and optimize the solution from $O(n^2)$ to

Medium · Data Structures & Algorithms

Given an array of integers, solve variations of the Two-Sum problem and optimize the solution from $O(n^2)$ to $O(n)$ time complexity.

Approach

  1. Brute force checks every pair: O(n^2) time, O(1) space. Then the one-pass hash map from value to index: for each element, look up target - a[i] before inserting a[i]. That gives O(n) expected time and O(n) space, and checking before inserting stops an element pairing with itself while still handling [3, 3] with target 6.
  2. Sorted or sortable input: two pointers from both ends, moving left when the sum is too big and right when it is too small. O(n) after an O(n log n) sort with O(1) extra space, but sorting loses the original indices, so sort (value, index) pairs if indices are required.
  3. Variants: return all unique pairs (skip equal neighbours after sorting), count pairs (a frequency map; when the complement equals the value itself, count c*(c-1)/2), closest sum to the target, and 3-Sum in O(n^2) by fixing one element and running two pointers.
  4. Edge cases: no valid pair (say what you return), negative numbers, and overflow of target - a[i] with fixed-width ints in Java or C. Hash lookups are O(1) expected but degrade under adversarial collisions.

Follow-up

  • Solve 3-Sum and avoid duplicate triplets.
  • Design a class with add(number) and find(target) for a stream. Which operation do you make cheap?
  • When would you choose the sort-based version over the hash map?

Implement iterative and recursive graph traversal algorithms (BFS and DFS) to find short paths or detect cycle

Medium · Data Structures & Algorithms

Implement iterative and recursive graph traversal algorithms (BFS and DFS) to find short paths or detect cycles in network topologies.

Approach

  1. Model the topology as an adjacency list. BFS and DFS both run in O(V + E) time with O(V) space for the visited set. Loop over every node as a start so disconnected components are covered.
  2. BFS uses a deque. Mark nodes visited when you enqueue them (not when you dequeue) so nothing is queued twice, and keep a parent map to rebuild the path. It finds the fewest-hop path in an unweighted graph. Weighted links need Dijkstra (non-negative weights, O((V + E) log V) with a heap).
  3. Write DFS both ways: recursive, and iterative with an explicit stack. The iterative form avoids recursion limits (Python's default is about 1000 frames) on long chains.
  4. Cycle detection depends on direction. Undirected: a visited neighbour that is not the current node's parent means a cycle (watch for parallel edges), or use union-find while adding edges. Directed: three colours, where an edge to a gray node is a back edge; or Kahn's topological sort, where fewer than V processed nodes means a cycle.
  5. Edge cases: source equals target, unreachable target, self-loops, and duplicate edges in the input.

Follow-up

  • Links now carry latency. How does your shortest-path code change?
  • Return every node within k hops of a given router.
  • Which single link failures would split the network in two, and how do you find them in linear time?

Given a string containing brackets, write a parser to validate whether bracket pairs are closed in the correct

Medium · Data Structures & Algorithms

Given a string containing brackets, write a parser to validate whether bracket pairs are closed in the correct order.

Approach

  1. Push opening brackets onto a stack. On a closing bracket, the stack must be non-empty and its top must be the matching opener (use a map such as ')' to '('). At the end the stack must be empty. O(n) time, O(n) space in the worst case.
  2. Explain why a counter is not enough with more than one bracket type: '([)]' keeps balanced counts but is invalid. A single counter does work for one type, as long as you reject the string when it goes negative.
  3. Edge cases: an empty string (usually valid), a string that starts with a closer, odd length (cheap early reject), and leftover openers at the end. Ask whether non-bracket characters are ignored or invalid.
  4. Return something useful beyond true or false if asked, for example the index of the first mismatch or the unclosed opener, by storing indices on the stack.

Follow-up

  • What is the minimum number of insertions to make the string valid?
  • Find the longest valid parentheses substring.
  • How would you skip brackets inside quoted string literals?

Explain the internal implementation of associative data structures (such as hash maps or red-black trees) in m

Medium · Software Architecture & Systems Developm

Explain the internal implementation of associative data structures (such as hash maps or red-black trees) in modern standard libraries like C++ STL or Java Collections.

Approach

  1. Java HashMap is an array of buckets whose size is a power of two (default 16). The index is (h ^ (h >>> 16)) & (n - 1). Collisions chain in a bucket, and passing the 0.75 load factor doubles the table and redistributes the entries. Since Java 8 a bucket with 8 or more entries becomes a red-black tree if the table has at least 64 slots (otherwise the table resizes), and it reverts to a list at 6.
  2. C++ std::unordered_map uses separate chaining with a default max_load_factor of 1.0. A rehash invalidates iterators, but pointers and references to elements stay valid. Lookup is O(1) on average and O(n) worst case. Contrast Python's dict, which uses open addressing with perturbed probing and keeps insertion order.
  3. Ordered maps (std::map, Java TreeMap) are red-black trees. Every node is red or black, the root is black, a red node has no red child, and every root-to-leaf path has the same number of black nodes. That bounds the height at 2*log2(n+1), so insert, find and erase are O(log n), using rotations and recolouring.
  4. Correctness: equals and hashCode must agree, and a key whose hash changes while it is in the map becomes unreachable. Neither Java structure is thread-safe; ConcurrentHashMap and Collections.synchronizedMap are the alternatives.
  5. Choosing between them: a hash map for point lookups; a tree map for sorted iteration, range queries, floor and ceiling. Mention that resizing costs O(1) amortised per insert and that hash flooding is a real attack (mitigated by randomised hashing or treeified buckets).

Follow-up

  • Compare open addressing with chaining: cache behaviour, deletion and load-factor limits.
  • Why is resizing O(1) amortised per insertion?
  • When would you pick a TreeMap over a HashMap in production code?

How do you manage multithreading and synchronization in low-level programming to prevent deadlocks and race co

Medium · Software Architecture & Systems Developm

How do you manage multithreading and synchronization in low-level programming to prevent deadlocks and race conditions?

Approach

  1. Define the race precisely: an unsynchronized read-modify-write on shared state (counter++ is a load, an add and a store). Fixes, cheapest first: avoid sharing (thread confinement, immutable data, message passing), then atomics with compare-and-swap, then a mutex around the smallest critical section that keeps the invariant.
  2. Deadlock needs all four Coffman conditions: mutual exclusion, hold-and-wait, no preemption and circular wait. Break circular wait with a global lock order (by id or address). Otherwise acquire several locks at once (std::scoped_lock), or use tryLock with a timeout and back off. Never call unknown code or callbacks while holding a lock.
  3. Use condition variables correctly: wait in a while loop on the predicate, because spurious wakeups happen, and change the predicate under the same mutex. A bounded producer-consumer queue is the standard example to write out.
  4. Memory visibility: in Java, volatile gives visibility and ordering but not atomicity for compound operations. In C and C++, volatile is not a synchronization tool, and a data race is undefined behaviour. Mention livelock and priority inversion (fixed by priority-inheritance mutexes).
  5. Verification: ThreadSanitizer or Helgrind for races, a thread dump (jstack, or gdb thread apply all bt) to find lock cycles, and stress tests that run many threads against the invariant.

Follow-up

  • Write a thread-safe bounded blocking queue.
  • When is a spinlock better than a sleeping mutex, and why can't you sleep in an interrupt handler?
  • A reader-writer lock is starving writers. How do you fix it?

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

  1. 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.
  2. 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.
  3. 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.
  4. 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?

Hold a per-tenant active cap against concurrent creates

Hard · write skew · isolation levels · constraints

A tenant on the standard plan may hold at most 50 resources with status='active'. The create handler runs SELECT count(*) FROM resource WHERE tenant_id = $1 AND status = 'active', compares to 50, then inserts. Two creates arrive 3 ms apart on different instances and the tenant lands at 51. Name the anomaly, say whether PostgreSQL 16 READ COMMITTED or REPEATABLE READ prevents it and why, then give an implementation that holds the cap at READ COMMITTED with the exact statements. Finally, say what changes when the cap is 'at most one running export per tenant' on job_run.

Approach

  1. Name it: write skew. The two transactions read an overlapping set and write disjoint rows, so there is no row-level conflict for the engine to detect and each commit is individually legal.
  2. Rule out the levels precisely. READ COMMITTED takes a fresh snapshot per statement and takes no lock on the counted rows, so both see 49. PostgreSQL's REPEATABLE READ is snapshot isolation: it removes non-repeatable reads and phantoms within the snapshot but still admits write skew, because the anomaly is not a re-read of a changed row, it is a read of a set that a concurrent transaction invalidates. Only SERIALIZABLE closes it, by tracking the read dependency and aborting one transaction with SQLSTATE 40001 — a guarantee that exists only if the application re-runs the whole transaction from the read.
  3. Convert the set predicate into a single-row conflict: keep tenant.active_resource_count and run UPDATE tenant SET active_resource_count = active_resource_count + 1 WHERE tenant_id = $1 AND active_resource_count < 50 in the same transaction as the INSERT. Zero affected rows is the cap, returned as 409. The row lock serialises the decision at any isolation level, and contention is bounded to one tenant's row — which is also the fair-scheduling unit, unlike a global counter that would convoy every tenant behind one row.
  4. State the cost you just took on: a counter is a second source of truth that can drift, so every path that changes status must adjust it inside the same transaction, and a periodic reconciliation has to exist, with resource_revision as the authority for what the count should have been.

Follow-up

  • A resource moves from archived back to active. Which statements change, and what breaks if the counter update and the status change land in different transactions?
  • The cap becomes plan-dependent and a plan can change mid-month. Where does the number 50 live, and who reads it?

Explain the process of IP subnetting and write logic to determine if a given IP address belongs to a specific

Medium · Networking & Computer Science Fundamenta

Explain the process of IP subnetting and write logic to determine if a given IP address belongs to a specific subnet mask.

Approach

  1. A /n prefix means the top n bits of the 32-bit address are the network part. Build the mask as all-ones shifted left by 32-n. Handle /0 separately, because shifting a 32-bit value by 32 is undefined in C and a no-op in Java (the shift count is masked to 5 bits).
  2. Membership test: parse both addresses into 32-bit integers, then check (ip & mask) == (network & mask). That is O(1). Network address = ip & mask, broadcast = network | ~mask, and usable hosts = 2^(32-n) - 2 for prefixes up to /30.
  3. Work one example aloud. For 192.168.10.77/26 the mask is 255.255.255.192 and the block size is 64, so the network is .64, broadcast .127, hosts .65 to .126, and the address is inside the subnet.
  4. Validate the input: exactly four octets, each 0-255, no empty parts. Decide whether to reject leading zeros, since some legacy parsers read them as octal. If the mask comes in dotted form, reject non-contiguous masks: (~mask + 1) must be a power of two.
  5. Edge cases: a /31 has two usable addresses on point-to-point links (RFC 3021), and a /32 is a single host. Python's ipaddress module does all of this, but write the bit logic yourself and mention the library as the production choice.

Follow-up

  • How does the same check work for IPv6's 128-bit addresses?
  • Given thousands of subnets, how would you find the longest-prefix match for an address quickly (for example with a binary trie)?
  • How would you merge adjacent subnets into the smallest set of CIDR blocks?

Compare and contrast TCP and UDP transport protocols, detailing header structures, connection handshakes, and

Medium · Networking & Computer Science Fundamenta

Compare and contrast TCP and UDP transport protocols, detailing header structures, connection handshakes, and appropriate trade-offs for real-time applications.

Approach

  1. TCP is connection-oriented. The three-way handshake (SYN, SYN-ACK, ACK) syncs both sides' initial sequence numbers. TCP then gives a reliable, ordered byte stream through sequence and ack numbers, retransmission, receive-window flow control and congestion control (slow start, congestion avoidance, fast retransmit). Teardown is a FIN/ACK in each direction, and the side that closes first waits in TIME_WAIT for 2*MSL.
  2. Headers: TCP is 20 bytes minimum and up to 60 with options. It has ports, sequence and ack numbers, data offset, flags (SYN, ACK, FIN, RST, PSH, URG), window, checksum, urgent pointer, and options such as MSS, window scale, SACK and timestamps. UDP is 8 bytes: source port, destination port, length and checksum (optional over IPv4, required over IPv6).
  3. Real-time trade-off: in voice, video or games a late packet is worthless. TCP's retransmission and head-of-line blocking add latency, so these apps use UDP and add only what they need: sequence numbers and timestamps (as RTP does), a jitter buffer, loss concealment or FEC, and their own rate control.
  4. Semantics: UDP keeps message boundaries but can lose, duplicate or reorder datagrams. TCP is a stream with no boundaries, so the application must frame its messages (length prefix or delimiter).
  5. Name the middle ground. QUIC runs over UDP and gives per-stream reliability without cross-stream head-of-line blocking, and HTTP/3 runs on it.

Follow-up

  • Why does TCP need three messages to open a connection rather than two?
  • What is TIME_WAIT for, and what goes wrong on a busy server that opens many short connections?
  • How would you add just enough reliability on top of UDP for a control message that must arrive?

Walk through the exact step-by-step packet flow and address resolution protocols (ARP, DNS, DHCP) when a host

Medium · Networking & Computer Science Fundamenta

Walk through the exact step-by-step packet flow and address resolution protocols (ARP, DNS, DHCP) when a host initiates a connection to a remote web server.

Approach

  1. Start with DHCP if the host has no address. It runs Discover, Offer, Request, Ack: the client broadcasts from 0.0.0.0 on UDP port 68 to port 67 and gets back an IP, subnet mask, default gateway, DNS servers and a lease time.
  2. Name resolution comes next: browser cache, then OS cache and hosts file, then a stub query to the configured resolver on UDP 53 (falling back to TCP if the response is truncated). The recursive resolver walks root, then TLD, then authoritative servers, and caches the A or AAAA record for its TTL.
  3. Routing decision: the host ANDs the destination with its mask. If the destination is remote, the next hop is the default gateway, so it ARPs for the gateway's MAC (broadcast who-has, unicast reply, then cached). Note that this ARP may already have happened to reach the DNS server.
  4. On the wire, the Ethernet destination is the gateway's MAC and the IP destination is the server. Each router decrements TTL and rewrites the layer-2 header while the IP addresses stay the same, except at a NAT device, which rewrites the source IP and port.
  5. Then the TCP handshake to port 443, the TLS handshake (ClientHello with SNI, certificate chain validation, key exchange, one round trip in TLS 1.3), and finally the HTTP request. Give the order clearly and state which protocol and layer each step uses.

Follow-up

  • What changes if the server is on the same subnet as the host?
  • How does traceroute use TTL and ICMP Time Exceeded to map this path?
  • If the page does not load, which commands would you run in what order to find the failing layer?

Explain bitwise operations and write a function to set, clear, and toggle specific bits within an integer.

Medium · Networking & Computer Science Fundamenta

Approach

  1. Give the four operations with a mask m = 1 << k. Set: x | m. Clear: x & ~m. Toggle: x ^ m. Test: (x >> k) & 1. Each is O(1). Validate k first, because it must be in [0, width).
  2. Use an unsigned or wide enough literal: 1u << 31 or 1L << k. Shifting a 32-bit int by 32 or more is undefined in C, and in Java the shift count is masked, so 1 << 32 == 1.
  3. Right shifts: Java has >> (arithmetic, sign-extending) and >>> (logical). In C, right-shifting a negative signed value is implementation-defined, so do bit work on unsigned types.
  4. In Python, ints are arbitrary precision and ~x == -x - 1. To emulate 32-bit behaviour, AND results with 0xFFFFFFFF.
  5. Show adjacent tricks: x & (x - 1) clears the lowest set bit (Kernighan popcount, power-of-two test with x > 0), x & -x isolates the lowest set bit, and (x >> pos) & ((1 << len) - 1) extracts a field, for example the flag bits in a protocol header.

Follow-up

  • Count the set bits in an integer. What is the complexity of your method?
  • Extract and replace a multi-bit field at a given position without touching the other bits.
  • Why does XOR-swapping two variables fail when both refer to the same memory location?

Walk through how you would structure a RESTful API or microservice for an order processing module, including d

Medium · Software Architecture & Systems Developm

Walk through how you would structure a RESTful API or microservice for an order processing module, including database choices and fault tolerance strategies.

Approach

  1. Define the resources and the order lifecycle: POST /orders, GET /orders/{id}, and an explicit transition such as POST /orders/{id}/cancel. Model status as a state machine (for example created, paid, preparing, ready, completed, cancelled) and return 409 for illegal transitions, 201 on create and 404 for unknown ids.
  2. Choose a relational database for orders and line items: you need multi-row transactions and constraints, and item prices should be stored as they were at order time. Guard concurrent transitions with a version column (optimistic locking) or a conditional UPDATE ... WHERE status = expected.
  3. Make creation idempotent: the client sends an Idempotency-Key, a unique constraint stores it with the response, and a retried request returns the original result instead of a second order or charge.
  4. Fault tolerance around dependencies: timeouts on every outbound call, and retries with exponential backoff and jitter only for idempotent operations. Add a circuit breaker on the payment client, and use a transactional outbox so the order row and its OrderCreated event commit together. Consumers must be idempotent because delivery is at least once.
  5. Across payment and inventory, use a saga with compensating actions (refund, release stock) instead of a distributed transaction. Keep the service stateless behind a load balancer, serve order history from a read replica, and cache menu or catalog data, never order state.

Follow-up

  • Payment succeeds but the service crashes before recording it. How does the order recover?
  • A client times out and retries the create call. Walk through what prevents a double charge.
  • Orders spike tenfold at peak hours. What do you queue, limit or scale first?

Discuss Object-Oriented Programming (OOP) concepts such as encapsulation, polymorphism, and inheritance, and e

Medium · Software Architecture & Systems Developm

Discuss Object-Oriented Programming (OOP) concepts such as encapsulation, polymorphism, and inheritance, and explain how you apply specific design patterns in your daily work.

Approach

  1. Define each concept with a small example. Encapsulation: an Order keeps its line items private so the total can only change through addItem and removeItem, which enforce the invariant. Inheritance: an is-a relationship that reuses behaviour. Polymorphism: callers work against an interface and dynamic dispatch picks the implementation at runtime.
  2. Separate the kinds of polymorphism: subtype (virtual methods or interfaces), ad hoc (overloading) and parametric (generics or templates). Say how dispatch works, for example a vtable lookup in C++.
  3. Raise inheritance's costs: fragile base classes and Liskov violations (the Square extends Rectangle problem). Explain why composition plus interfaces is often the safer default.
  4. Name two or three patterns with the problem each solved in your own code. Strategy swaps pricing or retry policies. Factory hides which concrete class gets built. Observer fans out events. Decorator wraps an interface with logging or caching. Builder handles many optional parameters. Note the cost of Singleton: global state that is hard to test.
  5. Close with one real instance, in the first person: the pattern you applied, the alternative you rejected, and what it made easier or harder later.

Follow-up

  • When would you choose an abstract class over an interface in Java now that interfaces have default methods?
  • Show a case where inheritance caused a bug that composition would have avoided.
  • How do the SOLID principles show up in a class you designed recently?

Explain how you approach low-level design (LLD) when building reusable software libraries and maintainable API

Medium · Software Architecture & Systems Developm

Explain how you approach low-level design (LLD) when building reusable software libraries and maintainable API interfaces.

Approach

  1. Start from the caller: write the calling code for the main use cases first, then shape the smallest public surface that makes it read cleanly. Everything else stays package-private or behind an interface.
  2. Make the contract explicit: input validation, the error model (exceptions versus result or error types, chosen once and used consistently), documented thread safety, null handling, and immutable value objects. Resources are released deterministically (RAII, try-with-resources, context managers).
  3. Build extension points instead of flags: strategy interfaces and dependency injection let callers plug in behaviour such as a retry policy or serializer and keep the library testable. These are open-closed and dependency inversion applied concretely.
  4. Plan for change: semantic versioning, additive changes only within a major version, and deprecations with a migration path before removal. Builders or option objects let parameters grow without breaking signatures.
  5. Show it on one example you have built, for example a client library: the public types, what you hid, how it is tested through its public API, and one decision you would revisit.

Follow-up

  • A method used by many teams needs a new required parameter. How do you change it without breaking them?
  • How do you decide between throwing exceptions and returning error values in a library?
  • How do you test a library's behaviour without coupling the tests to its internals?

Describe a technically complex project from your past experience end-to-end, highlighting key architectural tr

Medium · Behavioral & Past Project Deep Dives

Describe a technically complex project from your past experience end-to-end, highlighting key architectural trade-offs you made.

Approach

  1. Open with context and constraints in two or three sentences: what the system did, its scale in numbers you can defend, and your role. Separate clearly what you built or decided from what the team did, using 'I' for your own work.
  2. Walk the architecture as a data flow: the entry point, services, storage, queues or caches, and external dependencies. Be ready to go one level deeper on any component, including how it fails, how it was deployed and how it was monitored.
  3. Pick two or three real trade-offs and give each the same shape: the options, the deciding constraint, what you gave up. Examples: SQL versus a document store, synchronous calls versus a queue, strong consistency versus latency, building versus buying.
  4. Close with a measured outcome (latency, throughput, error rate, cost, delivery date) and one thing you would change now. The answer falls apart if you list technologies without saying why each was chosen.

Follow-up

  • What would break first at ten times the load?
  • Which decision would you reverse with what you know now?
  • What was the hardest bug in that system, and how did you find it?

Walk through a scenario where a production bug occurred in your code, explaining how you debugged the root cau

Medium · Behavioral & Past Project Deep Dives

Walk through a scenario where a production bug occurred in your code, explaining how you debugged the root cause and implemented preventive measures.

Approach

  1. Choose a bug that was genuinely in your code and had real impact. Start with detection (an alert, a user report, a metric) and the impact in concrete terms: who was affected and for how long.
  2. Mitigate before root-causing: roll back, flip a feature flag or fail over. Then investigate in order: reproduce it, read the logs, metrics and traces around the start time, list what changed (deploy diff, config, traffic, dependency version), and bisect or test one hypothesis at a time.
  3. Name the root cause technically, for example a race on shared state, an unhandled null, an off-by-one, a missing timeout that exhausted a connection pool, or a timezone or encoding assumption. Explain why the existing tests and review missed it.
  4. Prevention: a regression test that fails without the fix, an alert or dashboard that would have caught it sooner, and a guardrail such as input validation, a timeout or a lint rule. Mention a blameless write-up if there was one.
  5. Show ownership without defensiveness. Spend most of the answer on your reasoning during the debugging, not on the background.

Follow-up

  • How did you confirm the fix addressed the cause and that the recovery was not a coincidence?
  • What monitoring would have caught it earlier?
  • How did you communicate the impact while it was being fixed?

Suggested practice checklist

Seven days built from the three reported rounds and the reported questions: two days on networking and OS fundamentals, two on coding, one on design and OOP, and two on stories and a mixed mock. Each day ends with something you can show.

Day 1 — Subnetting and the transport layer

  • Write the subnet membership function in your main language using 32-bit integers and masks, then extend it to return network address, broadcast address and host range from an address-and-mask string. Test /0, /31, /32 and malformed input.
  • Build a TCP versus UDP table covering header fields, handshake and teardown, ordering and retransmission, flow and congestion control, and say which you would pick for a real-time stream and why.

Deliverable: A working subnet utility with its test cases, and a one-page TCP versus UDP table with a stated recommendation for real-time traffic.

Day 2 — Packet flow and connection troubleshooting

  • Write the full sequence for a host reaching a remote web server: DHCP, ARP for the gateway, DNS, TCP handshake, request. Mark the layer at each step and what each router hop rewrites.
  • Capture your own page load with tcpdump or a packet viewer and annotate each packet against your sequence.
  • Write an ordered checklist for a client that cannot reach a backend, using ping, nslookup, traceroute, netstat and tcpdump, and state what each result rules in or out.

Deliverable: A written packet-flow sequence, an annotated capture, and a troubleshooting checklist with the conclusion each command supports.

Day 3 — Linux internals, bits and concurrency

  • Explain aloud virtual memory (pages, page tables, TLB, page faults), stack versus heap, process versus thread, context switching and what a scheduler decides. Note where you stop being sure.
  • Write set, clear, toggle and test-bit functions plus a bit-count function, covering index bounds and sign behaviour on shifts.
  • Write a two-lock deadlock and a lost-update race on a counter, reproduce both, then fix them with lock ordering and a lock or atomic.

Deliverable: A spoken outline of OS concepts with your gaps listed, bit helpers with tests, and a deadlock and a race each reproduced and fixed.

Day 4 — Core coding: LRU cache, list reversal, Two-Sum

  • Implement the LRU cache with a hash map and doubly linked list using sentinels, with get and put in constant time. Test capacity one, updating an existing key and eviction order, then explain how you would make it thread-safe.
  • Reverse a singly linked list iteratively and recursively, and trace zero, one and two nodes by hand.
  • Solve Two-Sum by brute force, then with a one-pass hash map, then the sorted-input two-pointer and count-all-pairs variants, handling duplicates.

Deliverable: Three solutions that pass your own test cases, each with stated time and space complexity and the edge cases listed.

Day 5 — Graphs, parsing and library internals

  • Write BFS shortest path on an unweighted graph and DFS in both iterative and recursive form, then add cycle detection for directed and undirected graphs.
  • Write bracket validation with a stack, covering an empty string, an unmatched closer and mixed bracket types. Also write top-K most frequent elements from a stream using a hash map and a heap.
  • Write a half-page on how your language's hash map and its ordered map work: buckets, load factor, resizing, collision handling, balanced-tree ordering and the cost of each operation.

Deliverable: Working traversal, parser and top-K code with complexity notes, plus a half-page comparing hash maps and ordered maps.

Day 6 — Order-processing design, OOP and library design

  • Outline a REST service for order processing: resources, the state machine for an order, idempotency keys on create, database choice with reasons, retries, and how a queue or outbox decouples downstream steps. Then sketch the reported edge-device log ingestion scenario.
  • Write an OOP answer with one real example each for encapsulation, polymorphism and inheritance, and two design patterns you have used.
  • Outline the public API of a reusable library: names, error types, versioning, and how callers retry safely.

Deliverable: A one-page order-service design with a diagram, a finished paging drill, OOP notes with real examples, and an API outline with its error types.

Day 7 — Stories and a mixed mock

  • Write STAR outlines for the late-requirement-change, architecture-disagreement, complex-project and production-bug prompts, with every action in the first person.
  • Write the two-part answer to why this role and how your experience aligns, using the reported stack and requirements, plus questions for the recruiter about the team.
  • Run a mixed mock aloud and record it: one networking explanation, one coding problem, one design outline and one story. List the points where you stalled.

Deliverable: Four STAR outlines, a written motivation answer with recruiter questions, and a recorded mock with a list of weak points to revisit.

Behavioural preparation

The reported managerial or HR stage covers leadership competencies, career goals and team fit, and the project prompts ask for architecture trade-offs and a debugging story. Prepare stories where the decision was yours, where the engineering detail is concrete, and where you can state the result and its cost. Candidates report a tip to describe personal technical contributions instead of speaking only in team terms.

  1. Why do you want to work as a Software Engineer at Cisco Restaurant + Bar, and how does your experience align with the team's mission?
  2. Describe a technically complex project from your past experience end-to-end, highlighting key architectural trade-offs you made.
  3. Walk through a scenario where a production bug occurred in your code, explaining how you debugged the root cause and implemented preventive measures.
  4. Walk me through a project on your CV and tell me which parts you wrote yourself.

Tell me about a time when you had to adapt to changing project requirements or tight technical deadlines.

Medium · Behavioral & Past Project Deep Dives

Approach

  1. Choose a project where the change was real: a requirement moved, an interface was renegotiated, or a date was pulled in after work had started. State what changed and when in two sentences, then spend the rest of the answer on your decisions.
  2. Show triage. List what was already built, what depended on the changed requirement, and what could ship in a reduced form. Say what you cut or deferred, who agreed, and how you communicated it to product or QA.
  3. Make the technical adaptation specific and personal: you isolated the volatile part behind an interface, used a feature flag, kept tests on the stable code, or shipped a smaller vertical slice first. A single concrete code-level choice is stronger than a description of teamwork.
  4. Finish with the outcome and its cost: what shipped, what was left out, what shortcut you recorded and when it was repaid, and one thing you would set up earlier. A story that is only long hours or heroics, or that says we throughout, does not show your decision-making.

Follow-up

  • What did you decide not to build, and who signed off on that?
  • How did you keep quality up under the compressed schedule: tests, review, rollout?
  • What would you put in place earlier so a late change costs less next time?

How do you handle technical disagreements with team members regarding software architecture or design decision

Medium · Behavioral & Past Project Deep Dives

How do you handle technical disagreements with team members regarding software architecture or design decisions?

Approach

  1. Pick a real architecture or design disagreement where you held a position and the outcome mattered: a synchronous call versus a queue between services, one service versus two, SQL versus NoSQL for an orders table, or the shape of a library API.
  2. Present both positions fairly in terms of the trade-off: consistency, latency, operational cost, complexity, reversibility. If you can state the other person's case well enough that they would agree with your summary, say so.
  3. Show how it was settled with evidence instead of volume: a prototype, a benchmark or load test, a short written comparison of options, or an agreement to start with the reversible option and revisit. If data could not settle it, say who made the call and how you committed to it.
  4. Give the result honestly, including a case where you were the one who changed your mind. A story where you were simply right and the other engineer was careless suggests you do not listen; a story with no stance suggests you avoid conflict.

Follow-up

  • Tell me about a time you were wrong in a design argument.
  • If the decision went against you and you still thought it was a mistake, what did you do?
  • How does your approach differ between a code review comment and a design meeting?

Why do you want to work as a Software Engineer at Cisco Restaurant + Bar, and how does your experience align w

Medium · Behavioral & Past Project Deep Dives

Why do you want to work as a Software Engineer at Cisco Restaurant + Bar, and how does your experience align with our team's mission?

Approach

  1. The prompt has two halves, so structure the answer that way: why this role, then how your experience matches it. Keep the whole answer short and specific.
  2. For motivation, anchor in the work candidates describe: networking protocols, real-time services, backend APIs, cloud-native services or low-level network components. Choose the one that genuinely interests you and back it with evidence such as a project, a packet-capture debugging session, coursework or a certification like CCNA if you hold one.
  3. For alignment, map two or three listed requirements to proof from your own work: your main language, data structures and algorithms, networking and OS fundamentals, Git, and any nice-to-have you really have, such as Docker, Kubernetes, a cloud platform or Spring Boot or Flask. Name one gap and what you are doing about it.
  4. Do not recite a mission or values you cannot source. Ask the recruiter what the team works on earlier in the process and use the answer. Generic enthusiasm or flattery that would fit any employer is the usual weakness here.

Follow-up

  • Which part of the work do you expect to be hardest for you?
  • What other roles are you considering, and how does this one compare?
  • What would you want to learn first once you join the team?