Amdocs interview questions & answers

20 real Amdocs interview questions with full model answers — Coding, Technical, Behavioral, System design. Drawn from the same verified bank ChannelPulse drills from (27 Amdocs questions in total).

BehavioralMediumAmdocsSoftware EngineerTechnical interview

1. If your team has to complete a project before a deadline and your manager will become unavailable after a few days, how would you coordinate with y…

The full question

If your team has to complete a project before a deadline and your manager will become unavailable after a few days, how would you coordinate with your team to meet the deadline?

Model answer

  1. Situation — On a delivery project with a fixed release date, our manager had to become unavailable shortly after the work began. The team still had several dependent tasks to finish, so the main risk was losing time to unclear priorities or waiting for decisions.
  2. Task — I needed to help the team agree on a realistic plan, make ownership clear, and keep work moving without relying on the manager for day-to-day decisions.
  3. Action
  • I first asked the manager to confirm the deadline, the must-have scope, known risks, and which decisions we could make independently. I documented the answers, along with escalation contacts and any decisions that genuinely required management approval.
  • I worked with the team to break the remaining work into small, verifiable tasks. We mapped dependencies, estimated effort together, and identified the critical path rather than treating every item as equally urgent.
  • I proposed owners and backups for each critical task, and checked that the workload was balanced. For example, if an API change blocked both UI and testing, I made that dependency explicit and arranged an early integration point instead of leaving integration until the end.
  • Before the manager became unavailable, I shared a concise plan and risk list with them and asked for quick agreement on scope trade-offs. We also agreed who would make routine technical decisions and how to escalate a blocker that could affect the deadline.
  • I set a short daily team sync focused on progress, next steps, and blockers, plus a shared status page. I kept updates factual and raised risks early, with options—for example, defer a lower-priority enhancement rather than reduce testing on a critical path.
  • I reserved time for integration, regression testing, and release preparation, and adjusted task assignments when a dependency slipped. I would keep stakeholders informed rather than presenting an optimistic date without evidence.
  1. Result — The team had a shared plan and clear decision ownership before the manager stepped away, which reduced waiting and made risks visible early. We completed the agreed release scope by the deadline, while documenting any deferred items for follow-up. I learned that preparation for a manager’s absence is less about adding meetings and more about securing decisions early, distributing ownership, and making progress transparent.
BehavioralMediumAmdocsSoftware EngineerTechnical Interview

2. How did you clean the data in your machine-learning project?

Model answer

  1. Situation — In a telecom churn-prediction project, I worked with subscriber and billing data collected from several source systems. The dataset had inconsistent customer identifiers, missing usage values, duplicate records, and a risk of leakage because some fields were generated after the prediction date. Those issues could make offline model results look much better than production performance.
  2. Task — I owned the data-quality and preprocessing pipeline, with the goal of producing reliable training data while keeping the transformations reproducible and consistent between training and inference.
  3. Action
  • I first profiled each field for null rates, distinct values, ranges, duplicates, and time coverage. I compared those checks across sources and documented which system was authoritative for each attribute.
  • I standardized identifiers, timestamps, units, and categorical values before joining the data. For example, I normalized different representations of service status and rejected records with invalid dates rather than silently coercing them.
  • I investigated missingness by feature and customer segment. I imputed only where it made sense, using training-set statistics for numeric fields and an explicit “unknown” category for some categorical fields. I also retained missingness indicators when absence could itself carry information.
  • I removed exact duplicates and resolved conflicting subscriber snapshots using a clear event-time rule. I used a time-based train/validation split and excluded fields that were not available at the prediction cutoff to prevent leakage.
  • I put the cleaning steps into a version-controlled pipeline and added checks for schema changes, null thresholds, valid ranges, and row-count changes. I reviewed the rules with the data owners so that fixes did not conceal upstream source defects.
  1. Result — The pipeline made the training data repeatable and surfaced source problems before they reached model training. In the example project, validation performance became more representative of later-period results, and the team could trace each transformed field back to its source and rule. I learned that data cleaning is not just filling nulls: it is defining trustworthy, time-correct data contracts with measurable checks.
CodingEasyAmdocsSoftware Engineer

3. Single Number (LeetCode)

Model answer

The task

Given an integer array in which every value appears twice except for one value that appears once, return the value that appears only once.

Key idea

XOR cancels pairs: x ^ x is zero, and XOR with zero leaves a value unchanged. Since XOR is also associative and commutative, the order of the array does not matter.

Approach

  1. Initialize an accumulator to zero.
  2. XOR each array value into the accumulator.
  3. After all pairs cancel, the accumulator contains the unpaired value.
  4. Return it.
class Solution:
    def singleNumber(self, nums: list[int]) -> int:
        # Paired values cancel under XOR.
        result = 0

        for value in nums:
            result ^= value

        return result

Complexity:

  • Time: O(n), where n is the number of array elements; each value is processed once.
  • Space: O(1), since the algorithm uses only one accumulator, regardless of the array size.

Common follow-ups

  • What if every value appears three times except one? Use bit counts across all values, keeping each count modulo three; the remaining bits form the unique value.
  • What if two values appear once and all others appear twice? XOR all values to get the XOR of the two unique values, then use a set bit to divide values into two groups.
  • Does the order of the array matter? No. XOR is associative and commutative, so the same result is produced for any order.
  • Can this be solved without modifying the input? Yes. The algorithm only reads the array and stores its running XOR.
CodingEasyAmdocsSoftware Engineer

4. Construct Uniform Parity Array I (LeetCode)

Model answer

The task

The title suggests making an array uniform with respect to parity, but it does not specify the allowed operations or required output. Without those details, the safe general approach is to inspect whether the array’s values already share a parity.

Key idea

An integer’s parity is its remainder modulo 2. Compare each value’s parity with the first value’s parity; any mismatch means the array is not already uniform.

Approach

  1. Treat an empty array as uniform.
  2. Record the first value’s parity.
  3. Scan the remaining values.
  4. Return False at the first parity mismatch; otherwise return True.
def has_uniform_parity(nums: list[int]) -> bool:
    """Return whether all values in nums have the same parity."""
    if not nums:
        return True

    expected_parity = nums[0] % 2
    for value in nums[1:]:
        if value % 2 != expected_parity:
            return False

    return True

Complexity:

  • Time: O(n), where n is the number of values scanned.
  • Space: O(1), using only a fixed amount of extra storage.

Common follow-ups

  • What if the task permits changing values? The permitted operations determine whether parity can change, so they are needed to give a correct construction.
  • How should negative integers be handled? In Python, % 2 is 0 for even integers and 1 for odd integers, including negative ones.
  • Can the scan stop early? Yes; it returns as soon as it finds a parity mismatch.
CodingEasyAmdocsSoftware EngineerTechnical Interview

5. Given an array, find the two adjacent numbers with the maximum sum.

Model answer

function maxAdjacentPair(numbers) {
  if (numbers.length < 2) {
    throw new Error('At least two numbers are required');
  }

  // Start with the first adjacent pair; strict > keeps the earliest tie.
  let bestIndex = 0;
  let bestSum = numbers[0] + numbers[1];

  for (let i = 1; i < numbers.length - 1; i++) {
    const sum = numbers[i] + numbers[i + 1];
    if (sum > bestSum) {
      bestSum = sum;
      bestIndex = i;
    }
  }

  return {
    sum: bestSum,
    pair: [numbers[bestIndex], numbers[bestIndex + 1]],
    indices: [bestIndex, bestIndex + 1],
  };
}

console.log(maxAdjacentPair([4, -1, 8, 3, 7]));
// { sum: 15, pair: [8, 7], indices: [2, 3] }
  • Scan each adjacent pair once, maintaining the best sum and its starting index.
  • The strict comparison returns the first pair if multiple pairs tie.

Complexity: O(n) time and O(1) extra space.

CodingEasyAmdocsSoftware EngineerTechnical interview

6. Write a simple SQL query.

Model answer

Here is a JavaScript equivalent of a simple SQL query such as SELECT name FROM users WHERE active = true:

const users = [
  { id: 1, name: "Asha", active: true },
  { id: 2, name: "Ben", active: false },
  { id: 3, name: "Chen", active: true }
];

// Equivalent to selecting the names of active users.
const activeNames = users
  .filter(user => user.active)
  .map(user => user.name);

console.log(activeNames); // ["Asha", "Chen"]
  • filter corresponds to the SQL WHERE clause.
  • map selects the requested column, like SELECT name.

Complexity: Time O(n); extra space O(k), where k is the number of active users.

CodingEasyAmdocsSoftware EngineerTechnical interview

7. Write a program to check whether a number is even or odd without using the modulo operator.

Model answer

// Read an integer from standard input and determine its parity
// without using the modulo operator.
const input = require("fs").readFileSync(0, "utf8").trim();
const value = BigInt(input);

if ((value & 1n) === 0n) {
  console.log("Even");
} else {
  console.log("Odd");
}
  • The least significant bit is 0 for even integers and 1 for odd integers.
  • BigInt avoids the 32-bit conversion limitation of JavaScript's bitwise operators on ordinary Number values.

Complexity: Time O(1) for fixed-width values; extra space O(1).

CodingMediumAmdocsSoftware EngineerTechnical Interview

8. Write MySQL queries involving grouping, wildcard operators, and joins.

Model answer

// Sample data representing MySQL tables.
const customers = [
  { id: 1, name: "Ava Chen", planId: 10 },
  { id: 2, name: "Ben Ortiz", planId: 20 },
  { id: 3, name: "Amir Khan", planId: 10 },
  { id: 4, name: "Zoe Park", planId: 30 }, // No matching plan
];

const plans = [
  { id: 10, name: "Fiber Plus" },
  { id: 20, name: "Mobile Basic" },
];

// Convert a SQL LIKE pattern to a regular expression.
// '%' matches any sequence; '_' matches exactly one character.
function likePatternToRegExp(pattern) {
  const escaped = pattern.replace(/[.*+?^${}()|[]\]/g, "\$&");
  const regexBody = escaped.replace(/%/g, ".*").replace(/_/g, ".");
  return new RegExp(`^${regexBody}$`, "i");
}

// Equivalent to: WHERE name LIKE 'A%'
const namePattern = likePatternToRegExp("A%");
const namesStartingWithA = customers.filter((customer) =>
  namePattern.test(customer.name)
);

// Equivalent to an INNER JOIN on customers.planId = plans.id.
const innerJoin = customers.flatMap((customer) => {
  const plan = plans.find((item) => item.id === customer.planId);
  return plan ? [{ customer: customer.name, plan: plan.name }] : [];
});

// Equivalent to a LEFT JOIN: keep customers even when no plan matches.
const leftJoin = customers.map((customer) => {
  const plan = plans.find((item) => item.id === customer.planId);
  return { customer: customer.name, plan: plan?.name ?? null };
});

// Equivalent to GROUP BY planId with COUNT(*).
const countsByPlan = customers.reduce((counts, customer) => {
  counts.set(customer.planId, (counts.get(customer.planId) ?? 0) + 1);
  return counts;
}, new Map());

const groupedResults = [...countsByPlan].map(([planId, customerCount]) => ({
  planId,
  customerCount,
}));

console.log("Names matching A%:", namesStartingWithA.map((c) => c.name));
console.log("Inner join:", innerJoin);
console.log("Left join:", leftJoin);
console.log("Grouped counts:", groupedResults);
  • The Map aggregation implements grouping and counting; find plus filtering implements an inner join, while the left-join version preserves unmatched customers.
  • LIKE wildcards are translated so % matches zero or more characters and _ matches exactly one.

Complexity: Join operations are O(C × P) here, where C is the customer count and P is the plan count; grouping is O(C). Space is O(C + G) for the left-join output and grouped results, where G is the number of groups.

CodingMediumAmdocsSoftware Engineer

9. Number of Divisible Substrings (LeetCode)

Model answer

The task

Map each lowercase letter to a value from 1 to 26. Count the substrings whose total value is divisible by their length.

Key idea

A qualifying substring has an integer average, and that average must be between 1 and 26. For each possible average k, count substrings whose average is exactly k using prefix sums: two adjusted prefixes match when the substring between them has average k.

Approach

  1. Convert each character to its value from 1 to 26.
  2. For each target average k from 1 to 26, scan the word’s prefix sums.
  3. At prefix position i, compute prefix_sum - k * i.
  4. Add the number of earlier prefixes with that same adjusted value.
  5. Sum the counts for all target averages.
from collections import defaultdict

class Solution:
    def countDivisibleSubstrings(self, word: str) -> int:
        values = [ord(char) - ord("a") + 1 for char in word]
        total = 0

        # A divisible substring has an integer average in [1, 26].
        for average in range(1, 27):
            frequencies = defaultdict(int)
            frequencies[0] = 1
            adjusted_prefix = 0

            for value in values:
                adjusted_prefix += value - average
                total += frequencies[adjusted_prefix]
                frequencies[adjusted_prefix] += 1

        return total

Complexity:

  • Time: O(26n), scanning the string once for each possible average.
  • Space: O(n), for the prefix-frequency dictionary.

Common follow-ups

  • What if the alphabet has a different value range? Iterate over every possible integer average between the minimum and maximum character values.
  • Can the algorithm return counts by average? Keep a separate count for each target average instead of adding them into one total.
  • Can it process a stream? Maintain the prefix-frequency maps as characters arrive; each new character updates the count for every possible average.
CodingMediumAmdocsSoftware Engineer

10. Design a 3D Binary Matrix with Efficient Layer Tracking (LeetCode)

Model answer

The task

The title suggests a mutable 3D binary grid where operations should keep information about each layer up to date. The exact operations are not specified, so the design below illustrates a common interpretation: read or update a cell, and find the layer containing the most 1s.

Key idea

Store the coordinates of set cells in a hash set, and keep a 1 count for each layer. A max-heap makes the most populated layer quick to find; version numbers let updates leave old heap entries to be discarded lazily.

Approach

  1. Treat the first coordinate as the layer index.
  2. Store only set-cell coordinates, so cell reads and updates use a hash set.
  3. On a cell change, adjust its layer’s count and push a new heap entry.
  4. When querying the best layer, discard entries whose version or count is outdated.
  5. Rebuild the heap occasionally to bound how much stale data accumulates.
import heapq

class BinaryGrid3D:
    """A sparse 3D binary grid with per-layer population tracking."""

    def __init__(self, layers: int, rows: int, cols: int) -> None:
        self.layers = layers
        self.rows = rows
        self.cols = cols
        self.ones: set[tuple[int, int, int]] = set()
        self.counts = [0] * layers
        self.versions = [0] * layers

        # Entries are (-number_of_ones, layer_index, version).
        self.heap = [(0, z, 0) for z in range(layers)]
        heapq.heapify(self.heap)

    def _check(self, z: int, r: int, c: int) -> None:
        if not (0 <= z < self.layers and
                0 <= r < self.rows and
                0 <= c < self.cols):
            raise IndexError("cell coordinate out of range")

    def get(self, z: int, r: int, c: int) -> int:
        self._check(z, r, c)
        return int((z, r, c) in self.ones)

    def set(self, z: int, r: int, c: int, value: int) -> None:
        self._check(z, r, c)
        if value not in (0, 1):
            raise ValueError("cell value must be 0 or 1")

        cell = (z, r, c)
        was_set = cell in self.ones
        if was_set == (value == 1):
            return

        if value:
            self.ones.add(cell)
            self.counts[z] += 1
        else:
            self.ones.remove(cell)
            self.counts[z] -= 1

        self.versions[z] += 1
        heapq.heappush(
            self.heap, (-self.counts[z], z, self.versions[z])
        )

        # Keep stale heap entries bounded relative to the layer count.
        if len(self.heap) > 2 * self.layers:
            self.heap = [
                (-self.counts[i], i, self.versions[i])
                for i in range(self.layers)
            ]
            heapq.heapify(self.heap)

    def best_layer(self) -> tuple[int, int]:
        """Return (layer_index, number_of_ones); ties favor lower indices."""
        while self.heap:
            neg_count, z, version = self.heap[0]
            if version == self.versions[z] and -neg_count == self.counts[z]:
                return z, self.counts[z]
            heapq.heappop(self.heap)
        raise RuntimeError("no layers are available")

Complexity:

  • Time: get is O(1); set is O(log L) amortized; best_layer is O(log L) amortized, where L is the number of layers.
  • Space: O(K + L), where K is the number of set cells.

Common follow-ups

  • What if ties should return every most-populated layer? Track all layers matching the maximum count.
  • What if layers are inserted or removed? Rebuild or extend the per-layer arrays and heap.
  • What if the grid is dense? Replace the coordinate set with a 3D array; layer-count updates remain O(1).
System designMediumAmdocsSoftware EngineerTechnical interview

11. Design an app that provides information about someone who wants to visit your home for work, including their recent travel history, COVID test resu…

The full question

Design an app that provides information about someone who wants to visit your home for work, including their recent travel history, COVID test result, and symptoms.

Model answer

1. Requirements & scale

Functional requirements

  • Let a host invite a worker and, with the worker’s consent, review narrowly scoped visit-readiness information: declared recent travel, a current test result, and a recent symptom questionnaire.
  • Verify the source and timestamp of each item, show expiry and uncertainty, and give the host a clear, auditable summary before the visit.
  • Support revocation, correction, deletion, and a non-digital or reschedule path. Do not make a medical diagnosis or silently deny access based on an automated score.

Non-functional requirements

  • Health and travel data are highly sensitive: collect the minimum, restrict access to the invited host, encrypt end to end in transit and at rest, and apply short retention.
  • Require informed, specific consent; provide an alternative that does not expose more data than necessary. Log access without putting sensitive answers in logs.
  • Be available for scheduled visits, with clear handling when verification services are offline.

Estimates: For 100,000 homes and 10 visits/home/day, assume 1 million visits/day (about 12 requests/second average, 500 at peak). At 10 KB of structured data per visit, this is about 10 GB/day if retained; the design instead expires visit data quickly and retains only minimal audit metadata. At 20 reads per visit, peak read load is roughly 10,000 reads/second during concentrated scheduling windows.

2. High-level architecture

flowchart TD
  subgraph Client
    A[Worker App]
    B[Host App]
  end
  subgraph Edge/CDN
    C[WAF and API Gateway]
  end
  subgraph Load Balancer
    D[Regional Load Balancer]
  end
  subgraph API / Services
    E[Visit API]
    F[Consent and Identity]
    G[Verification Adapter]
    H[Disclosure Service]
  end
  subgraph Cache
    I[Short TTL Visit Cache]
  end
  subgraph Datastores
    J[Visit Metadata SQL]
    K[Encrypted Health Vault]
    L[Audit Store]
  end
  subgraph Message Queue
    M[Encrypted Event Queue]
  end
  subgraph Workers
    N[Expiry and Deletion Worker]
    O[Notification Worker]
  end
  A -->|consented answers and proof| C
  B -->|invite and authorized read| C
  C -->|authenticated request| D
  D -->|visit request| E
  E -->|authorize scope| F
  E -->|verify test provenance| G
  E -->|store minimum data| K
  E -->|visit state| J
  H -->|authorized summary| I
  I -->|cached summary| H
  H -->|access audit event| M
  M -->|audit record| L
  M -->|expiry schedule| N
  M -->|visit notifications| O
  E -->|API response| D
Diagram

3. API design

  • POST /v1/visits — host creates a visit invitation with purpose, time window, and requested data scope.
  • POST /v1/visits/{id}/consent — worker grants or declines specific disclosures; consent is versioned and revocable.
  • POST /v1/visits/{id}/screening — submit symptom answers and a test attestation or verification token.
  • GET /v1/visits/{id}/disclosure — host retrieves only authorized, current fields and provenance.
  • DELETE /v1/visits/{id}/data — revoke and initiate deletion; GET /v1/visits/{id}/audit — show access history to the worker.

4. Data model & storage

  • SQL visit metadata: visit ID, host and worker pseudonymous IDs, purpose, scheduled time, requested scopes, consent version/status, and expiry. Index by host and visit time.
  • Encrypted health vault: separate, envelope-encrypted records for symptom responses and test attestations. Store only what is needed: result category, test date, issuer or verification reference, and expiry—not a full medical record or image unless strictly necessary. Partition by visit ID; keys are access-controlled separately from application data.
  • Audit store: append-only actor, action, visit ID, timestamp, and policy decision; never record symptom text or test details in general logs.
  • Cache: brief TTL only for authorized summaries, keyed by visit and consent version. Invalidate on revocation or expiry. Queue messages contain opaque IDs, not sensitive payloads.

5. Deep dive

The core is safe, scoped disclosure—not merely collecting answers. The invitation specifies exactly what will be shared and why. The worker sees the request, consents per category, and can decline. A test result is displayed with its date, source, and verification status; self-reported symptoms are clearly labeled as self-reported. The system does not interpret symptoms as a diagnosis or turn missing data into a “clear” status.

sequenceDiagram
  participant H as Host
  participant V as Visit service
  participant W as Worker
  participant P as Verification provider
  participant D as Disclosure service
  H->>V: Create visit and request limited fields
  V-->>W: Notify with purpose and data scope
  W->>V: Review and grant or decline consent
  W->>V: Submit symptoms and test attestation
  V->>P: Verify issuer or token when available
  P-->>V: Return provenance and validity
  V->>V: Store encrypted, minimal records with expiry
  H->>D: Request visit disclosure
  D->>D: Check identity, consent, scope, and freshness
  D-->>H: Return permitted fields with timestamps
  D->>V: Record access event
Diagram

A host-facing view should say, for example, “Test: negative, verified by provider, taken 36 hours ago” and “Symptoms: none reported, submitted today,” rather than presenting a medical conclusion. Define configurable freshness windows with public-health and legal review; do not hard-code a claim that any result guarantees safety. If a provider is unavailable, show “not verified” and let the host and worker choose rescheduling or another agreed process.

6. Scale, bottlenecks & trade-offs

  • Run stateless services across multiple availability zones; use SQL transactions for consent changes and visit state. Replicate metadata for availability, while keeping encrypted sensitive records in a tightly controlled vault.
  • Favor strong authorization and consent consistency over availability for disclosure: if consent cannot be checked, do not reveal data. A limited outage can still show visit scheduling details, but not cached health information beyond its short TTL.
  • Provider integrations are a likely bottleneck. Use timeouts, circuit breakers, and an explicit “verification unavailable” state; never silently treat a failed check as a pass.
  • Push notifications should contain only a generic prompt. The worker opens the authenticated app to view details. This reduces lock-screen leakage and makes revocation effective.
  • Apply automatic expiry, deletion workflows, and access reviews; make retention durations visible and jurisdiction-configurable. The trade-off is a little more friction for workers in exchange for meaningful consent and reduced exposure. This is an information-sharing tool, not a substitute for public-health guidance or a host’s agreed safety policy.
System designHardAmdocsSoftware EngineerTechnical interview

12. How would you design an end-to-end system to measure the time you spend in front of all your electronic devices?

Model answer

1. Requirements & scale

Functional requirements

  • Measure active screen time across supported phones, computers, tablets, TVs, and browser sessions.
  • Show daily and weekly totals, device/category breakdowns, and trends; let users correct or exclude data.
  • Combine simultaneous sessions into a person-level estimate without losing per-device totals.
  • Support offline collection, multiple devices per account, and explicit consent.

Non-functional requirements

  • Treat activity data as sensitive: encrypt it, minimize collection, and let users export or delete it.
  • Keep device totals accurate and user-level summaries available within a few minutes.
  • Be resilient to intermittent connectivity and differences in operating-system permissions.

Estimates: Assume 10 million users, three devices each, and 30 session-boundary or active-state records per device per day: about 900 million records/day, or 10,400/second on average. At 300 bytes per record, that is roughly 270 GB/day before replication; a 10× peak is about 104,000 records/second. Retain raw events for 30 days (about 8.1 TB before indexes/replication), and keep compact daily aggregates longer.

2. High-level architecture

flowchart TD
  subgraph Client
    A[Mobile SDK]
    B[Desktop Agent]
    C[TV or Browser Connector]
    D[Local Event Buffer]
  end
  subgraph Edge/CDN
    E[API Gateway and WAF]
  end
  subgraph Load Balancer
    F[Regional Load Balancer]
  end
  subgraph API / Services
    G[Device Ingest API]
    H[Identity and Consent]
    I[Summary API]
  end
  subgraph Cache
    J[Redis Summary Cache]
  end
  subgraph Datastores
    K[Event Store]
    L[Aggregate Store]
    M[Device Registry SQL]
  end
  subgraph Message Queue
    N[Kafka Event Topics]
  end
  subgraph Workers
    O[Validate and Deduplicate]
    P[Sessionize and Aggregate]
  end
  A -->|screen state events| D
  B -->|foreground events| D
  C -->|supported activity events| D
  D -->|batched encrypted events| E
  E -->|authenticated request| F
  F -->|ingest| G
  G -->|check permissions| H
  G -->|accepted events| N
  N -->|consume| O
  O -->|valid events| K
  O -->|normalized events| P
  P -->|daily totals| L
  I -->|read summaries| J
  J -->|miss| L
  I -->|device metadata| M
  I -->|summary response| F
Diagram

3. API design

  • POST /v1/devices/{deviceId}/events:batch — upload signed, timestamped activity intervals; idempotency key prevents duplicate batches.
  • GET /v1/me/screen-time?from=&to=&groupBy= — return totals and breakdowns.
  • PATCH /v1/devices/{deviceId} — change device type, timezone, or inclusion settings.
  • POST /v1/me/data-export and DELETE /v1/me/data — provide export and deletion workflows.

4. Data model & storage

  • Device registry (SQL): device_id, user_id, platform, capabilities, consent state, last seen. Partition by account; enforce one owner per device.
  • Raw activity events (wide-column or time-series store): user_id, device_id, start/end timestamps, active/locked state, app category, source, event ID. Partition by user_id + day, with time buckets to bound partitions. Avoid collecting keystrokes, page contents, or precise app titles by default.
  • Daily aggregates (columnar/OLAP store): user, date, device/category, active seconds, confidence, and adjustment provenance. Keep long-term trend queries efficient.
  • Redis: short-lived cache for frequently requested summaries. Kafka buffers ingestion and decouples processing from client traffic.

5. Deep dive

The central problem is distinguishing screen-on time from a person actually looking at a screen, then avoiding double-counting. Each connector emits intervals with a source-specific confidence: foreground-and-unlocked is stronger evidence than merely powered-on. The product should label the metric “estimated active screen time,” explain its coverage, and never claim eye tracking unless the user explicitly enables a supported sensor.

sequenceDiagram
  participant D as Device collector
  participant A as Ingest API
  participant Q as Kafka
  participant W as Aggregation worker
  participant S as Summary store
  D->>A: Upload signed, idempotent intervals
  A->>A: Check consent, schema, clock bounds
  A->>Q: Publish accepted event
  Q->>W: Deliver at least once
  W->>W: Deduplicate and normalize intervals
  W->>W: Merge overlaps and compute confidence
  W->>S: Upsert device and user daily totals
  S-->>D: Summary available through API
Diagram

Workers deduplicate by event ID and make aggregate writes idempotent. They clamp implausible timestamps, split intervals at local midnight, and handle late events by recomputing affected days. Keep both device-seconds and a person-level union of intervals: the latter merges overlapping intervals, while uncertainty remains explicit when devices cannot establish whether the same person was present. In a household, account/device association must be deliberate; do not infer identity from network presence.

6. Scale, bottlenecks & trade-offs

  • Partition Kafka by user_id to preserve per-user ordering where practical; use consumer groups to scale workers. A hot account is mitigated with bounded event batches and subpartitioning if needed.
  • Use multi-AZ replicated event storage and durable queue acknowledgements. If processing lags, ingestion remains available and summaries become stale rather than losing events.
  • Cache common summaries, but invalidate or version entries when late data changes a day. Serve a freshness timestamp with results.
  • Prefer eventual consistency for aggregates; require strong consistency for consent changes and deletion state. A deletion tombstone blocks new processing while asynchronous jobs remove data from queues, stores, caches, and backups on a documented schedule.
  • Device APIs differ: use first-party OS APIs where permitted and clearly report unsupported devices or missing intervals. Favor privacy and honest coverage over a falsely precise “all devices” number.
TechnicalEasyAmdocsSoftware EngineerTechnical interview

13. What are the principles of object-oriented programming?

The full question

What are the principles of object-oriented programming? Explain each one.

Model answer

The four commonly cited principles of object-oriented programming are encapsulation, abstraction, inheritance, and polymorphism.

  1. Encapsulation — Keep an object's state and the operations that manage it together, while controlling access to its internals. For example, a BankAccount can keep its balance private and expose deposit() and withdraw() methods that enforce valid amounts. This protects invariants and reduces unintended coupling.
  2. Abstraction — Expose the essential behavior of a component while hiding implementation details. A caller can use a PaymentProcessor.charge() interface without knowing whether the implementation contacts a card network, validates tokens, or retries a request. Abstraction keeps consumers focused on what a component does rather than how it does it.
  3. Inheritance — Define a class in terms of an existing class, inheriting its behavior and optionally extending or overriding it. For example, SmsNotification and EmailNotification could inherit shared notification behavior from Notification. Inheritance is useful when there is a genuine “is-a” relationship, but deep hierarchies can make changes difficult to reason about; composition is often a better alternative.
  4. Polymorphism — Allow different types to be used through a common interface, with each type providing its own behavior. For instance, a service can call send() on any Notification implementation without branching on whether it is SMS or email. This makes it easier to add implementations while keeping the calling code stable.

In practice, I use these principles to make responsibilities clear, protect important state, and keep components replaceable and testable. They are guidelines, not a reason to add unnecessary classes or inheritance layers.

TechnicalEasyAmdocsSoftware EngineerTechnical Interview

14. Explain stacks, trees, linked lists, and queues.

Model answer

  1. Stack — A linear structure that follows LIFO: last in, first out. push adds to the top, and pop removes from the top. Both are typically O(1). Stacks are used for function calls, undo operations, and depth-first search.
  2. Tree — A hierarchical structure of nodes connected by edges. It has a root, parent-child relationships, and usually no cycles. In a balanced binary search tree, lookup, insertion, and deletion are typically O(log n); in an unbalanced tree they can degrade to O(n). Trees represent file systems, indexes, and hierarchical data.
  3. Linked list — A sequence of nodes where each node stores data and a pointer to another node. A singly linked list points forward; a doubly linked list points both forward and backward. Insertion or deletion is O(1) when the node position is already known, but searching for a position is O(n). Compared with arrays, lists do not require contiguous memory but have extra pointer overhead and slower indexed access.
  4. Queue — A linear structure that follows FIFO: first in, first out. enqueue adds at the rear and dequeue removes from the front; a queue implemented with a linked list or circular buffer can support both in O(1). Queues are useful for scheduling, buffering requests, and breadth-first search.

The key differences are their ordering rules and access patterns: stacks serve the most recent item, queues serve the oldest item, linked lists provide pointer-based sequential storage, and trees organize data hierarchically.

TechnicalEasyAmdocsSoftware EngineerTechnical interview

15. What is the difference between C and C++?

Model answer

  1. Programming model: C is primarily procedural: programs are organized around functions and data. C++ supports procedural programming as well as object-oriented and generic programming, including classes, templates, and operator overloading.
  2. Abstraction and reuse: C provides structs and functions, but no built-in classes or inheritance. C++ adds classes, access control, inheritance, and polymorphism, which can help model larger systems.
  3. Memory and resource management: Both allow low-level memory control. C commonly uses malloc and free; C++ adds constructors, destructors, and RAII, along with smart pointers such as std::unique_ptr to manage resources safely.
  4. Libraries and features: C++ provides the Standard Template Library and features such as exceptions, references, and function overloading. C has a smaller standard library and a simpler language model.
  5. Compatibility: C++ is not simply “C with classes”; the languages have different rules, and valid C code is not always valid C++. They can interoperate through well-defined interfaces, often using extern "C" for C linkage.

For example, C++ abstractions can be useful in complex telecom software, while C remains common in embedded or resource-constrained components. I would choose based on compatibility, performance constraints, and the maintainability needs of the system.

TechnicalEasyAmdocsSoftware EngineerTechnical Interview

16. What are the different types of joins in SQL?

Model answer

SQL joins combine rows from tables based on a related column or join condition.

  1. INNER JOIN — returns rows where the condition matches in both tables.
  2. LEFT JOIN (or LEFT OUTER JOIN) — returns every row from the left table and matching rows from the right. Unmatched right-side columns are NULL.
  3. RIGHT JOIN (or RIGHT OUTER JOIN) — returns every row from the right table and matching rows from the left. Unmatched left-side columns are NULL.
  4. FULL OUTER JOIN — returns matched rows plus unmatched rows from both sides. MySQL does not support this directly; it can be approximated with a UNION of left and right joins, taking care not to duplicate matches.
  5. CROSS JOIN — returns the Cartesian product: every row from one table paired with every row from the other.
  6. Self join — joins a table to itself, often to represent relationships such as employees and managers. It uses table aliases to distinguish the two instances.

For example, joining subscribers to their billing accounts on account_id with an INNER JOIN returns only subscribers that have a matching account. Choosing the right join depends on whether unmatched rows should be kept or excluded.

TechnicalEasyAmdocsSoftware EngineerTechnical Interview

17. What are primary keys and foreign keys in SQL?

Model answer

A primary key uniquely identifies each row in a table. It must be unique and cannot be NULL. A table has one primary-key constraint, which can consist of one column or a combination of columns. For example, subscriber_id could identify each subscriber.

A foreign key is a column or set of columns that references a primary or unique key in another table. It enforces referential integrity: for example, a billing account’s subscriber_id should refer to an existing subscriber. Depending on the constraint definition, updates or deletes can be rejected or handled with actions such as CASCADE or SET NULL.

A primary key identifies a row within its own table; a foreign key expresses and validates a relationship to another table. Indexing foreign-key columns can also help joins, though the exact indexing behavior depends on the database and schema.

TechnicalMediumAmdocsSoftware EngineerTechnical Interview

18. Explain the algorithms you used in your machine-learning project.

Model answer

In a subscriber-churn project, I used a supervised-learning pipeline to identify customers at risk of leaving. The goal was to rank customers for retention outreach, not just maximize overall accuracy.

  1. Prepared the data: I joined customer, service, billing, and support data by subscriber ID, then handled missing values, encoded categorical fields, and created features such as recent bill changes, payment delays, and support-call frequency. I made sure features only used information available before the prediction date to avoid leakage.
  2. Established a baseline: I started with logistic regression. It was fast, interpretable, and useful for checking whether the features had predictive value.
  3. Compared models: I evaluated random forest and gradient-boosted trees, which can capture nonlinear relationships and interactions—for example, the combined effect of repeated payment delays and recent service complaints.
  4. Validated appropriately: I used a time-based train/validation split to reflect how the model would be used in production. Since churn was relatively uncommon, I assessed precision, recall, PR-AUC, and lift in the top-risk groups rather than relying on accuracy alone.
  5. Made outputs actionable: I reviewed feature importance and explanations with business stakeholders, calibrated the risk threshold to the retention team’s capacity, and monitored model performance and data drift after deployment.
flowchart LR
    A[Subscriber and billing data] --> B[Feature engineering]
    B --> C[Logistic regression baseline]
    B --> D[Tree-based model comparison]
    C --> E[Time-based evaluation]
    D --> E
    E --> F[Ranked churn risk]
    F --> G[Retention outreach]
    G --> H[Outcome monitoring]
Diagram

The final choice depended on the trade-off between predictive performance, explainability, and operational cost. For a telecom or billing business, a model is useful only if its risk scores arrive reliably and help teams take measurable action.

TechnicalMediumAmdocsSoftware EngineerTechnical Interview

19. What are the different storage classes, and which memory class does each variable use?

Model answer

In C, storage classes describe a variable’s scope, lifetime, and linkage. The memory region is a useful model, but the compiler and runtime determine the actual placement.

  1. auto — The default for a local variable inside a function or block. It has block scope and automatic lifetime: it exists while execution is in that block. It is typically stored in a stack frame, though an optimizer may keep it in a register.
  2. register — Similar scope and lifetime to auto, but asks the compiler to favor a CPU register. It is only a hint; the compiler may ignore it. Historically, taking the variable’s address with & was disallowed.
  3. static — Has static storage duration, so it exists for the entire program. A block-scope static variable retains its value between calls and is typically stored in the data segment if initialized, or the BSS segment if zero-initialized. A file-scope static variable also has internal linkage, meaning it is visible only within that source file.
  4. extern — Declares a variable defined elsewhere. It usually refers to an object with static storage duration, typically in the data or BSS segment. extern provides external linkage when used for a file-scope declaration; it does not itself allocate a new object in the usual declaration case.
  5. _Thread_local (C11) — Gives an object thread storage duration: each thread gets its own instance, which lasts for that thread’s lifetime.

For example, a local int count; is normally automatic, a local static int count; persists between calls, and a file-scope extern int total; refers to a definition elsewhere. These are distinct from scope: scope is where a name can be referenced, while storage duration is how long its object exists.

TechnicalMediumAmdocsSoftware EngineerTechnical interview

20. What are the time and space complexities of the sorting algorithms?

Model answer

Sorting algorithms have different time and space costs; the exact performance can depend on input order and implementation.

AlgorithmBest timeAverage timeWorst timeExtra spaceNotes
Bubble sortO(n)O(n²)O(n²)O(1)O(n) best case assumes an early-exit check; stable.
Selection sortO(n²)O(n²)O(n²)O(1)Usually unstable; performs few swaps.
Insertion sortO(n)O(n²)O(n²)O(1)Stable and effective for small or nearly sorted inputs.
Merge sortO(n log n)O(n log n)O(n log n)O(n)Stable; useful when predictable performance matters.
QuicksortO(n log n)O(n log n)O(n²)O(log n) average stackTypically in-place; pivot choice affects worst case.
HeapsortO(n log n)O(n log n)O(n log n)O(1)In-place, but usually unstable.
Counting sortO(n + k)O(n + k)O(n + k)O(n + k)For integer keys in a bounded range of size k.
Radix sortO(d(n + k))O(d(n + k))O(d(n + k))O(n + k)d digit passes; k is the base/radix.

For comparison-based sorting, the general lower bound is Ω(n log n). Non-comparison sorts such as counting and radix sort can do better when their input-key assumptions hold.

Practice these out loud, don't memorise them

Reading an answer is not the same as being able to give one under pressure. ChannelPulse plays the interviewer, asks the follow-ups, and scores each answer with feedback and a model answer so you can hear the gap between what you said and what lands.

Get ChannelPulse Browse all questions