Accenture interview questions & answers

20 Accenture interview questions with full model answers — Behavioral, Product & growth, Coding, Technical. Drawn from the same bank ChannelPulse drills from (109 Accenture questions in total).

BehavioralMediumAccentureData ScientistBehavioral round

1. Give an example of scenarios in which you faced selection bias.

The full question

Give an example of scenarios in which you faced selection bias. How did you avoid it?

Model answer

The flow

  1. Identify the scenario: Recognize the presence of selection bias in your data.
  2. Analyze the data: Examine the data collection process and the dataset.
  3. Develop a strategy: Plan how to mitigate the bias.
  4. Implement the solution: Apply the chosen methods to reduce or eliminate the bias.
  5. Evaluate the results: Check the effectiveness of your solution.
  6. Reflect and learn: Consider what worked and what could be improved.

The answer

Situation: I was working on a project to analyze customer churn for a subscription-based service. Our goal was to identify patterns and predictors of customer churn to improve retention strategies. However, I noticed that our dataset only included customers who had interacted with customer support, which introduced selection bias.

Task: My task was to ensure that our analysis was representative of the entire customer base, not just those who had contacted support, as this could skew our understanding of churn predictors.

Action:

  • Recognized the Bias: I identified that the dataset was biased because it only included customers who had interacted with support, potentially missing out on those who churned silently.
  • Analyzed the Data: I examined the data collection process and confirmed that the dataset was not representative of the entire customer base.
  • Developed a Strategy: I proposed expanding the dataset to include a random sample of customers who had not interacted with support.
  • Implemented the Solution: I collaborated with the data engineering team to extract a more comprehensive dataset that included a random sample of all customers, ensuring a more balanced representation.
  • Evaluated the Results: After re-running the analysis with the new dataset, I found that the predictors of churn were more accurate and aligned with business expectations.

Result: By addressing the selection bias, we improved the accuracy of our churn model by 15%, which helped the company implement more effective retention strategies. This experience taught me the importance of critically evaluating datasets for biases and the impact they can have on analysis outcomes.

Why this works

  • Testing Analytical Skills: The interviewer is assessing your ability to identify and address selection bias, a common issue in data science.
  • Sanity Check: A strong answer includes a clear explanation of how the bias was identified and mitigated, demonstrating critical thinking.
  • Common Pitfall: Weak answers often fail to clearly articulate the steps taken to address the bias or lack specific outcomes, which can undermine credibility.
BehavioralMediumAccentureData ScientistBehavioral round

2. How would you describe Data Science to a Business Executive?

Model answer

The flow

  1. Understand the audience: Recognize the executive's background and priorities.
  2. Simplify the concept: Use relatable analogies and avoid technical jargon.
  3. Highlight business value: Focus on how data science can drive business outcomes.
  4. Provide examples: Use specific, relevant examples to illustrate points.
  5. Invite questions: Encourage dialogue to address concerns or curiosity.

The answer

Understand the audience: When explaining data science to a business executive, it's crucial to first understand their background and what aspects of the business they are most concerned with. This helps tailor the conversation to their interests and knowledge level.

Simplify the concept: Data science is essentially about extracting insights and knowledge from data to make informed decisions. Imagine it as a tool that turns raw data into actionable insights, much like how a chef turns raw ingredients into a delicious meal.

Highlight business value: Data science can significantly enhance decision-making processes by providing data-driven insights. For example, it can help in identifying customer trends, optimizing operations, and predicting future market behaviors, ultimately leading to increased efficiency and profitability.

Provide examples:

  • Customer Segmentation: By analyzing customer data, we can identify distinct segments within our customer base, allowing for more targeted marketing strategies and personalized customer experiences.
  • Predictive Maintenance: In manufacturing, data science can predict equipment failures before they occur, reducing downtime and maintenance costs.
  • Fraud Detection: In finance, data science models can detect unusual patterns that may indicate fraudulent activities, protecting the company from potential losses.

Invite questions: I encourage you to ask any questions or share any specific areas of interest where you think data science could make an impact. This way, I can provide more targeted examples or explanations that align with your business goals.

Why this works

  • Tailored Communication: The answer is tailored to the executive's level of understanding and interest, avoiding technical jargon that could confuse or disengage them.
  • Business Focus: By focusing on the business value and providing relevant examples, the answer connects data science to tangible business outcomes, which is what executives care about.
  • Engagement: Inviting questions fosters a two-way dialogue, allowing for clarification and deeper understanding, which is crucial in executive communication.
  • Weakness Avoidance: A weak answer would either be too technical, losing the executive's interest, or too vague, failing to demonstrate the potential impact of data science on the business.
CodingEasyAccentureSoftware Engineer

3. Merge Sorted Array (LeetCode)

Model answer

The task

Combine two already sorted arrays into one sorted array, placing the result in the first array. The first array has enough spare capacity to hold all elements from both arrays.

Key idea

Fill the first array from right to left. Comparing the largest remaining elements avoids overwriting values in the first array that have not yet been processed.

Approach

  1. Set pointers to the last valid elements of both arrays.
  2. Set a write pointer to the last slot in the first array.
  3. While the second array still has elements, compare the values at the two read pointers.
  4. Write the larger value at the write pointer, then move the corresponding read pointer and the write pointer left.
  5. Any remaining elements from the second array are copied into the first. Remaining elements from the first are already in place.
class Solution:
    def merge(self, nums1: list[int], m: int, nums2: list[int], n: int) -> None:
        """Merge nums2 into nums1 in-place, keeping nums1 sorted."""
        i = m - 1          # Last initialized element in nums1
        j = n - 1          # Last element in nums2
        write = m + n - 1  # Last available position in nums1

        # Fill from the back so unread nums1 elements are not overwritten.
        while j >= 0:
            if i >= 0 and nums1[i] > nums2[j]:
                nums1[write] = nums1[i]
                i -= 1
            else:
                nums1[write] = nums2[j]
                j -= 1
            write -= 1

Complexity:

  • Time: O(m + n), since each element is considered at most once.
  • Space: O(1), because the merge modifies the first array directly.

Common follow-ups

  • What if the arrays are sorted in descending order? Reverse the comparison or adapt the traversal direction.
  • What if the result must go into a separate array? Use two forward pointers and allocate O(m + n) extra space.
  • What if either array is empty? The loop naturally handles it; if the second is empty, the first is already complete.
  • Why merge from the end? Writing from the front could overwrite unprocessed elements in the first array.
CodingEasyAccentureSoftware Engineer

4. Roman to Integer (LeetCode)

Model answer

The task

Convert a string of Roman numeral symbols into its integer value. Roman numerals use a small set of symbols, with some smaller values placed before larger ones to indicate subtraction.

Key idea

Scan the string from left to right, comparing each symbol’s value with the next one. If the current value is smaller, subtract it; otherwise, add it. This handles subtractive pairs without needing to process them separately.

Approach

  1. Store the integer value for each Roman numeral symbol in a lookup table.
  2. Initialize a running total to zero.
  3. For each symbol, compare its value with the following symbol’s value, if one exists.
  4. Subtract the current value when it is smaller than the next value; otherwise, add it.
  5. Return the total. This assumes the input is a valid Roman numeral.
class Solution:
    def romanToInt(self, s: str) -> int:
        values = {
            "I": 1,
            "V": 5,
            "X": 10,
            "L": 50,
            "C": 100,
            "D": 500,
            "M": 1000,
        }

        total = 0

        for i, symbol in enumerate(s):
            current = values[symbol]

            # A smaller value before a larger value is subtracted.
            if i + 1 < len(s) and current < values[s[i + 1]]:
                total -= current
            else:
                total += current

        return total

Complexity: Time: O(n), where n is the string length, since each symbol is visited once.

Complexity: Space: O(1), because the lookup table has a fixed number of entries.

Common follow-ups

  • How would you handle invalid Roman numeral strings? Validate symbol order and repetition rules before or during conversion.
  • How would you convert an integer to a Roman numeral? Greedily subtract from a descending list of allowed values, including subtractive pairs.
  • Can the conversion be done scanning right to left? Yes; subtract a value if it is smaller than the largest value already seen to its right, otherwise add it.
CodingEasyAccentureSoftware Engineer

5. Next Greater Element I (LeetCode)

Model answer

The task

For each value in one array, find the first larger value appearing to its right in a second array that contains it. Return -1 when no such value exists.

Key idea

Scan the second array from left to right with a decreasing stack. When a new value is larger than values on the stack, it is the next greater value for each of them; store those answers in a hash map.

Approach

  1. Initialize an empty stack and a map of answers.
  2. For each value in the second array, pop smaller values from the stack and map each popped value to the current value.
  3. Push the current value onto the stack.
  4. Values still on the stack have no greater value to their right.
  5. Build the result by looking up each value from the first array, using -1 when it has no mapped answer.
from typing import List

class Solution:
    def nextGreaterElement(self, nums1: List[int], nums2: List[int]) -> List[int]:
        next_greater = {}
        decreasing_stack = []

        for value in nums2:
            # The current value is the first greater value for each
            # smaller value waiting on the stack.
            while decreasing_stack and decreasing_stack[-1] < value:
                next_greater[decreasing_stack.pop()] = value
            decreasing_stack.append(value)

        # Any value without a recorded answer has no greater value to its right.
        return [next_greater.get(value, -1) for value in nums1]

Complexity:

  • Time: O(n + m), where n and m are the lengths of the two arrays; each value is pushed and popped at most once.
  • Space: O(m), for the stack and answer map.

Common follow-ups

  • What if the second array is circular? Scan it twice, using indices modulo its length, and push only during the first pass.
  • What if values can repeat? Track indices on the stack and define how to match repeated values from the first array.
  • Can the answers be found online as values arrive? Yes; resolve stack entries when a larger value arrives, while retaining unresolved entries.
CodingEasyAccentureSoftware Engineer

6. Palindrome Number (LeetCode)

Model answer

The task

Determine whether an integer reads the same from left to right and right to left. Negative values are not palindromes.

Key idea

Reverse only the last half of the digits, then compare it with the remaining first half. This avoids converting to a string and keeps the extra space constant.

Approach

  1. Return False for negative integers.
  2. Return False for positive integers ending in zero; zero itself is a palindrome.
  3. Repeatedly move the last digit from the number to a reversed-half accumulator.
  4. Stop when the accumulator has at least as many digits as the remaining number.
  5. Compare the halves directly for even digit counts, or discard the middle digit for odd counts.
class Solution:
    def isPalindrome(self, x: int) -> bool:
        # Negative numbers have a leading minus sign, so they cannot be palindromes.
        if x < 0:
            return False

        # A positive number ending in zero would need a leading zero to be palindromic.
        if x != 0 and x % 10 == 0:
            return False

        reversed_half = 0

        # Move digits until the reversed half is at least as long as the remaining half.
        while x > reversed_half:
            reversed_half = reversed_half * 10 + x % 10
            x //= 10

        # For an odd number of digits, ignore the middle digit.
        return x == reversed_half or x == reversed_half // 10

Complexity:

  • Time: O(log₁₀ n), for processing the digits of the number.
  • Space: O(1), using only a few integer variables.

Common follow-ups

  • How would you check a palindrome by converting to a string? Compare symmetric characters, using O(log n) extra space.
  • How would you avoid integer overflow in a fixed-width language? Reversing only half the digits keeps the accumulator bounded.
  • What about zero and numbers ending in zero? Zero is palindromic; other numbers ending in zero are not.
CodingEasyAccentureSoftware Engineer

7. Two Sum (LeetCode)

Model answer

The task

Given a list of integers and a target, return the indices of two distinct elements whose values add up to the target. The usual version guarantees a valid pair.

Key idea

As we scan the list, store each value’s index in a hash table. For the current value, check whether its needed complement has already appeared; this finds a pair in one pass.

Approach

  1. Create a dictionary mapping previously seen values to their indices.
  2. For each element, compute the complement needed to reach the target.
  3. If that complement is in the dictionary, return its stored index and the current index.
  4. Otherwise, store the current value and index, then continue.
from typing import List

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        # Map each value already visited to its index.
        seen = {}

        for index, value in enumerate(nums):
            complement = target - value

            # A match must come from an earlier, distinct element.
            if complement in seen:
                return [seen[complement], index]

            seen[value] = index

        # The standard problem guarantees a solution.
        raise ValueError("No two elements sum to the target")

Complexity:

  • Time: O(n), where n is the number of elements; each lookup and insertion is O(1) on average.
  • Space: O(n), for the dictionary of values seen so far.

Common follow-ups

  • What if there may be multiple valid pairs? Return the first pair found, or keep searching and collect pairs according to the required output rules.
  • What if the input is sorted? Use two pointers from opposite ends for O(1) extra space; preserve original indices if those are required.
  • What if values repeat? The dictionary stores indices, and checking before insertion ensures the current element is not paired with itself.
CodingEasyAccentureSoftware Engineer

8. Convert Sorted Array to Binary Search Tree (LeetCode)

Model answer

The task

Build a height-balanced binary search tree using every value from a sorted array. Return the root of the tree.

Key idea

Choose the middle value as each subtree’s root. This splits the remaining values into left and right portions of roughly equal size, keeping the tree balanced.

Approach

  1. Define a recursive helper over a half-open range [lo, hi).
  2. If the range is empty, return None.
  3. Choose its midpoint and create a node with that value.
  4. Recursively build the left and right subtrees from the portions on either side.
  5. Call the helper on the entire array.
from typing import List, Optional

class TreeNode:
    def __init__(
        self,
        val: int = 0,
        left: Optional["TreeNode"] = None,
        right: Optional["TreeNode"] = None,
    ):
        self.val = val
        self.left = left
        self.right = right

class Solution:
    def sortedArrayToBST(self, nums: List[int]) -> Optional[TreeNode]:
        def build(lo: int, hi: int) -> Optional[TreeNode]:
            # The half-open range [lo, hi) contains no values.
            if lo >= hi:
                return None

            mid = (lo + hi) // 2
            node = TreeNode(nums[mid])
            node.left = build(lo, mid)
            node.right = build(mid + 1, hi)
            return node

        return build(0, len(nums))

Complexity:

  • Time: O(n), since each array value is used to create one node.
  • Space: O(log n) auxiliary space for recursion in a balanced tree; O(n) for the returned nodes.

Common follow-ups

  • What if the array is empty? The helper immediately returns None.
  • Can either middle element be chosen when the range has even length? Yes; choosing the lower or upper middle still gives a balanced tree.
  • How would you handle an input that is not sorted? Sort it first, taking O(n log n) time, if sorting is allowed.
CodingEasyAccentureSoftware Engineer

9. Valid Palindrome (LeetCode)

Model answer

The task

Determine whether a string reads the same forward and backward after disregarding characters that are not letters or digits and treating uppercase and lowercase as equivalent.

Key idea

Compare characters from both ends, skipping anything that should be ignored. If every remaining pair matches, the string is a palindrome.

Approach

  1. Initialize pointers at the start and end of the string.
  2. Move the left pointer past non-alphanumeric characters.
  3. Move the right pointer past non-alphanumeric characters.
  4. Compare the lowercase forms of the characters at the pointers; return False if they differ.
  5. Move both pointers inward and continue. If they meet or cross, return True.
class Solution:
    def isPalindrome(self, s: str) -> bool:
        left, right = 0, len(s) - 1

        while left < right:
            # Ignore characters that are not letters or digits.
            while left < right and not s[left].isalnum():
                left += 1
            while left < right and not s[right].isalnum():
                right -= 1

            # Compare without regard to letter case.
            if s[left].lower() != s[right].lower():
                return False

            left += 1
            right -= 1

        return True

Complexity:

  • Time: O(n), where n is the string length; each pointer moves only inward.
  • Space: O(1), since the comparisons use no additional data structure.

Common follow-ups

  • What if the input contains no letters or digits? It is considered a palindrome, since there are no mismatching characters.
  • Can you avoid creating a normalized copy of the string? Yes; the two-pointer scan uses constant extra space.
  • How would you handle Unicode normalization? Normalize the string first if canonically equivalent characters should compare as equal; that may require additional space.
CodingEasyAccentureSoftware Engineer

10. Isomorphic Strings (LeetCode)

Model answer

The task

Determine whether two strings have the same length and whether their characters can be matched one-to-one so that each position in one string corresponds to the same position in the other.

Key idea

Maintain mappings in both directions. A character in the first string must always map to the same character in the second, and two different characters cannot map to the same character.

Approach

  1. Return False if the strings have different lengths.
  2. Create a mapping from the first string to the second.
  3. Create a reverse mapping from the second string to the first.
  4. Scan corresponding characters together.
  5. If either mapping conflicts with the current pair, return False; otherwise, record the pair.
  6. If every pair is consistent, return True.
class Solution:
    def isIsomorphic(self, s: str, t: str) -> bool:
        if len(s) != len(t):
            return False

        forward = {}
        reverse = {}

        for left, right in zip(s, t):
            if left in forward and forward[left] != right:
                return False
            if right in reverse and reverse[right] != left:
                return False

            forward[left] = right
            reverse[right] = left

        return True

Complexity:

  • Time: O(n), where n is the string length; each position is checked once.
  • Space: O(k), where k is the number of distinct characters stored in the mappings.

Common follow-ups

  • What if the mapping only needs to preserve characters in one direction? Use just one mapping; this does not enforce a one-to-one correspondence.
  • What if the strings are streamed? Process corresponding characters as they arrive, retaining the two mappings.
  • Can the extra space be bounded for a fixed alphabet? Yes; use arrays instead of dictionaries when the character set has a known, small range.
CodingEasyAccentureSoftware Engineer

11. Happy Number (LeetCode)

Model answer

The task

Determine whether repeatedly replacing a positive integer with the sum of the squares of its digits eventually reaches 1. If the sequence loops without reaching 1, the number is not happy.

Key idea

The digit transformation is deterministic, so the sequence either reaches 1 or eventually repeats a value. Floyd’s cycle-finding algorithm detects a repeat using two pointers and constant extra space.

Approach

  1. Define a helper that computes the sum of the squared digits of a number.
  2. Start a slow pointer at the input and a fast pointer one transformation ahead.
  3. Advance the slow pointer once and the fast pointer twice per iteration.
  4. Stop if the fast pointer reaches 1 or the pointers meet.
  5. Return whether the fast pointer reached 1.
class Solution:
    def isHappy(self, n: int) -> bool:
        def next_value(value: int) -> int:
            total = 0
            while value > 0:
                digit = value % 10
                total += digit * digit
                value //= 10
            return total

        slow = n
        fast = next_value(n)

        while fast != 1 and slow != fast:
            slow = next_value(slow)
            fast = next_value(next_value(fast))

        return fast == 1

Complexity:

  • Time: O(log n), since digit transformations rapidly reduce the value and each transformation processes its digits.
  • Space: O(1), because only two pointers and a few temporary values are used.

Common follow-ups

  • How can a set solve this? Store values as they appear; a repeated value proves a cycle, using O(k) extra space for k visited values.
  • What if the transformation changes? The cycle-detection method still works for any deterministic transformation.
  • How would you test edge cases? Check 1, a known happy value, and values whose sequences enter a non-1 cycle.
CodingEasyAccentureSoftware Engineer

12. Contains Duplicate II (LeetCode)

Model answer

The task

Determine whether an array contains equal values at two different indices whose distance is at most k.

Key idea

Keep a hash set of values from the relevant recent indices. Before checking the current value, remove the value that is now too far away; if the current value is already in the set, a qualifying pair exists.

Approach

  1. Return False if k is zero or negative.
  2. Iterate through the array from left to right.
  3. Once the index is more than k past the start, remove the value at index i - k - 1.
  4. If the current value is in the set, return True; otherwise, add it.
  5. Return False if no qualifying pair is found.
from typing import List

class Solution:
    def containsNearbyDuplicate(self, nums: List[int], k: int) -> bool:
        if k <= 0:
            return False

        window = set()

        for i, value in enumerate(nums):
            # This index is now more than k positions behind i.
            if i > k:
                window.remove(nums[i - k - 1])

            if value in window:
                return True

            window.add(value)

        return False

Complexity:

  • Time: O(n), with each value added to and removed from the set at most once.
  • Space: O(min(n, k + 1)), for the recent values stored in the set.

Common follow-ups

  • What if the matching indices must have distance less than k? Adjust the window boundary so it retains only the preceding k - 1 indices.
  • How can the method return the matching indices? Store each value’s most recent index in a dictionary and return the pair when the distance qualifies.
  • What if the input arrives as a stream? Keep the same sliding window and set, evicting values as each new item arrives.
CodingEasyAccentureSoftware Engineer

13. Maximum Area of Longest Diagonal Rectangle (LeetCode)

Model answer

The task

Given rectangle dimensions, return the area of the rectangle with the longest diagonal. If multiple rectangles share the longest diagonal, return the greatest area among them.

Key idea

Compare squared diagonal lengths, length² + width², so there is no need to compute square roots. Track the best diagonal and its associated area as you scan the rectangles.

Approach

  1. Initialize the best diagonal and area to zero.
  2. For each rectangle, compute its squared diagonal and area.
  3. If its diagonal is longer, update both tracked values.
  4. If its diagonal ties the best, keep the larger area.
  5. Return the tracked area.
from typing import List

class Solution:
    def areaOfMaxDiagonal(self, dimensions: List[List[int]]) -> int:
        best_diagonal_squared = -1
        best_area = 0

        for length, width in dimensions:
            diagonal_squared = length * length + width * width
            area = length * width

            if diagonal_squared > best_diagonal_squared:
                best_diagonal_squared = diagonal_squared
                best_area = area
            elif diagonal_squared == best_diagonal_squared:
                best_area = max(best_area, area)

        return best_area

Complexity:

  • Time: O(n), where n is the number of rectangles.
  • Space: O(1), using only a fixed number of variables.

Common follow-ups

  • What if the task asks for the rectangle’s dimensions too? Track the dimensions alongside the best area.
  • Why compare squared diagonals? Squaring preserves the ordering of nonnegative diagonal lengths and avoids square-root calculations.
  • What if dimensions arrive as a stream? The same scan works, keeping only the current best diagonal and area.
CodingEasyAccentureSoftware Engineer

14. Search Insert Position (LeetCode)

Model answer

The task

Given a sorted array of distinct integers and a target, return its index if present. Otherwise, return the index where it should be inserted to keep the array sorted.

Key idea

Use binary search to find the first position whose value is at least the target. That position is both the target’s index when it exists and its insertion point otherwise.

Approach

  1. Set left to the start of the array and right to its length, treating right as an exclusive bound.
  2. While the search interval is nonempty, inspect its midpoint.
  3. If the midpoint value is less than the target, search to its right.
  4. Otherwise, search the portion including the midpoint and to its left.
  5. When the interval is empty, left is the answer. It can equal the array length if the target belongs at the end.
class Solution:
    def searchInsert(self, nums: list[int], target: int) -> int:
        # Find the first index whose value is at least target.
        left, right = 0, len(nums)

        while left < right:
            mid = left + (right - left) // 2

            if nums[mid] < target:
                left = mid + 1
            else:
                right = mid

        return left

Complexity:

  • Time: O(log n), since each step halves the search interval.
  • Space: O(1), using only a fixed number of variables.

Common follow-ups

  • What if the array is empty? The result is 0, which is the correct insertion position.
  • What if duplicates are allowed? This algorithm returns the first position containing the target, or where it should first be inserted.
  • How would you find the last position of a target? Use a binary search for the first value greater than the target, then subtract one.
CodingEasyAccentureSoftware Engineer

15. Minimum Right Shifts to Sort the Array (LeetCode)

Model answer

The task

Find the smallest number of right shifts that makes the array non-decreasing. Return -1 if no number of right shifts can do so.

Key idea

A valid rotation has at most one drop between consecutive elements. If there is one drop, the final element must be no greater than the first; otherwise the rotation cannot produce a sorted array.

Approach

  1. Scan adjacent pairs and record where an element is greater than the next.
  2. If there are no drops, the array is already sorted, so return 0.
  3. If there is more than one drop, return -1.
  4. For the single drop at index i, check that the array’s last element is no greater than its first.
  5. If that check passes, return n - i - 1, the number of right shifts that moves the suffix before the prefix.
class Solution:
    def minimumRightShifts(self, nums: list[int]) -> int:
        n = len(nums)
        drop_index = -1

        for i in range(n - 1):
            if nums[i] > nums[i + 1]:
                if drop_index != -1:
                    return -1
                drop_index = i

        if drop_index == -1:
            return 0

        # The two parts must join in non-decreasing order.
        if nums[-1] > nums[0]:
            return -1

        return n - drop_index - 1

Complexity:

  • Time: O(n), for one scan of adjacent elements.
  • Space: O(1), using only a few variables.

Common follow-ups

  • What if the array may contain duplicates? The same checks work with non-decreasing comparisons.
  • Can the array be modified in place? Yes; perform the required rotation after determining the shift count.
  • How would you handle an empty array? Return 0 by defining an empty array as already sorted.
Product & growthMediumAccentureData ScientistAnalytics / experimentation round

16. How many users do we need to detect a 0.5% lift in conversion?

Model answer

The flow

  1. Formulate Hypothesis & Metric: Define what constitutes a 0.5% lift in conversion.
  2. Determine Unit of Randomization: Decide whether to randomize at the user or session level.
  3. Calculate Power & Sample Size: Use statistical formulas to determine the required sample size.
  4. Run Experiment & Guard Against Peeking: Execute the test while avoiding premature data analysis.
  5. Analyze Results with Guardrails: Interpret results with confidence intervals and statistical significance.

The answer

Hypothesis & Metric

  • Hypothesis: Implementing a new feature will result in a 0.5% increase in the conversion rate.
  • Metric: Conversion rate, defined as the number of users who complete a purchase divided by the total number of users.

Unit of Randomization

  • We will randomize at the user level to ensure independence between groups and to account for user-specific behavior.

Power & Sample Size

  • Desired power: 80%
  • Significance level (alpha): 0.05
  • Baseline conversion rate: Assume 5% based on historical data.
  • Minimum detectable effect (MDE): 0.5% increase, making the target conversion rate 5.5%.

To calculate the sample size, we use the formula for sample size in A/B testing:

$$ n = \frac{2 \times (Z_{1-\alpha/2} + Z_{1-\beta})^2 \times p_1 \times (1 - p_1)}{(p_2 - p_1)^2} $$

where:

  • $Z_{1-\alpha/2}$ is the z-score for a 95% confidence level (~1.96).
  • $Z_{1-\beta}$ is the z-score for 80% power (~0.84).
  • $p_1$ is the baseline conversion rate (0.05).
  • $p_2$ is the target conversion rate (0.055).

Plugging in the values, we get:

$$ n = \frac{2 \times (1.96 + 0.84)^2 \times 0.05 \times (1 - 0.05)}{(0.055 - 0.05)^2} \approx 156,000 $$

Run Experiment & Guard Against Peeking

  • Run the experiment for a pre-determined duration, ensuring no interim analysis is conducted that could bias results.

Analyze Results with Guardrails

  • After the experiment, calculate the conversion rates for both groups.
  • Use confidence intervals and p-values to determine if the observed lift is statistically significant.
  • If the p-value is less than 0.05 and the confidence interval does not include zero, we can conclude the lift is significant.

Why this works

  • Testing Statistical Understanding: The interviewer wants to see if you understand the statistical principles behind A/B testing, such as power and sample size calculations.
  • Guarding Against Common Pitfalls: A strong answer addresses issues like peeking at data, which can lead to incorrect conclusions.
  • Weak Answer Pitfalls: Failing to specify the unit of randomization or skipping the calculation of sample size can show a lack of thoroughness.
  • Trade-offs: Recognizing the trade-off between sample size and power demonstrates an understanding of practical constraints in experimentation.
Product & growthMediumAccentureManagement ConsultantCase interview

17. How many mattresses are sold annually in the USA?

Model answer

The flow

  1. Segment the population: Determine the total population and relevant segments.
  2. Apply penetration rate: Estimate the percentage of households purchasing a new mattress annually.
  3. Determine frequency: Estimate how often each household buys a mattress.
  4. Calculate total demand: Multiply the number of households by penetration and frequency.
  5. Estimate price: Determine the average price of a mattress.
  6. Sanity check: Validate the final number with industry benchmarks or logical reasoning.

The answer

1. Segment the population

  • The USA has approximately 330 million people.
  • Assume an average household size of 3 people.
  • Calculate the number of households: $330 \text{ million} / 3 = 110 \text{ million households}$.

2. Apply penetration rate

  • Assume 10% of households purchase a new mattress each year.
  • Calculate the number of households buying mattresses: $110 \text{ million} \times 10\% = 11 \text{ million households}$.

3. Determine frequency

  • Assume each household buys a new mattress every 10 years.
  • Therefore, the frequency of purchase is 0.1 mattresses per household per year.

4. Calculate total demand

  • Total annual demand: $11 \text{ million households} \times 0.1 = 1.1 \text{ million mattresses}$.

5. Estimate price

  • Assume an average price of $500 per mattress.
  • Total market value: $1.1 \text{ million mattresses} \times $500 = $550 \text{ million}$.

6. Sanity check

  • Cross-verify with industry reports. If the industry reports suggest a market size close to this estimate, the calculation is reasonable.
  • Consider factors like economic conditions or trends that might affect mattress sales.

Why this works

  • Testing segmentation skills: The interviewer assesses the candidate's ability to break down a large population into manageable segments.
  • Logical estimation: The candidate must make reasonable assumptions about penetration and frequency, demonstrating analytical thinking.
  • Sanity check importance: A strong answer includes a validation step to ensure the calculated figure is plausible.
  • Common pitfalls: Weak answers may skip steps, use unrealistic assumptions, or fail to validate the final number against external data.
Product & growthMediumAccentureManagement ConsultantCase interview

18. How many mobile phones are manufactured weekly in China?

Model answer

The flow

  1. Segment the population: Identify the relevant segments of the population involved in manufacturing mobile phones.
  2. Apply penetration: Estimate the penetration rate of mobile phone manufacturing within these segments.
  3. Frequency: Determine the frequency of manufacturing cycles.
  4. Price: Consider the average cost of manufacturing a mobile phone for sanity check.
  5. Sanity-check the order of magnitude: Validate the final number with industry benchmarks or logical reasoning.

The answer

1. Segment the population:

  • Focus on the number of manufacturing plants in China that produce mobile phones. Assume there are about 500 major manufacturing plants dedicated to mobile phone production.

2. Apply penetration:

  • Assume that out of these 500 plants, 80% are actively producing mobile phones at any given time. This gives us 400 active plants.

3. Frequency:

  • Assume each plant produces an average of 10,000 phones per week. This is based on the assumption that a plant operates 5 days a week and produces 2,000 phones per day.

4. Price:

  • Consider the average manufacturing cost of a mobile phone is around $200. This is used to sanity-check the economic feasibility of the production numbers.

5. Sanity-check the order of magnitude:

  • Calculate the total weekly production: 400 plants * 10,000 phones = 4,000,000 phones per week.
  • This number seems reasonable given China's large manufacturing capacity and its role as a global leader in electronics production.

Recommendation: China manufactures approximately 4 million mobile phones weekly.

Why this works

  • Testing estimation skills: The interviewer assesses your ability to make logical assumptions and perform quick calculations.
  • Sanity check: A strong answer includes a sanity check to ensure the numbers align with industry norms.
  • Weak answers: Candidates may fail by not segmenting the population accurately or by neglecting to validate their assumptions with a sanity check.
  • Logical reasoning: The approach demonstrates structured thinking and logical reasoning, which are crucial in consulting.
Product & growthMediumAccentureManagement ConsultantCase interview

19. How many pretzels are needed to build a tower as tall as Big Ben?

Model answer

The flow

  1. Segment the population: Determine the height of Big Ben.
  2. Apply penetration and frequency: Estimate the height of a single pretzel.
  3. Calculate total units: Divide the height of Big Ben by the height of one pretzel to find the number of pretzels needed.
  4. Sanity-check the order of magnitude: Validate the calculation with a rough comparison to known objects or structures.

The answer

Segment the population:

  • Big Ben is approximately 96 meters tall.

Apply penetration and frequency:

  • Assume a standard pretzel has a height of about 10 cm (0.1 meters).

Calculate total units:

  • To find out how many pretzels are needed to build a tower as tall as Big Ben, divide the height of Big Ben by the height of one pretzel: $$\text{Number of pretzels} = \frac{96}{0.1} = 960$$

Sanity-check the order of magnitude:

  • A pretzel tower of 960 pretzels, each 10 cm tall, should logically reach 96 meters, aligning with the height of Big Ben. This calculation seems reasonable given the dimensions.

Why this works

  • Testing estimation skills: The interviewer is assessing the candidate's ability to make reasonable assumptions and perform quick calculations.
  • Logical reasoning: A strong answer shows clear logical steps and justifies assumptions with real-world dimensions.
  • Sanity check: A good candidate will validate their results by comparing them to known quantities, ensuring the final number is plausible.
  • Common pitfalls: Weak answers might skip steps, use unrealistic assumptions, or fail to verify the feasibility of their calculations.
TechnicalMediumAccentureData ScientistML round

20. What Metrics Would You Use to Evaluate a Churn Prediction Model?

Model answer

The flow

  1. Frame the problem → Identify the business objective (reduce churn) and define churn.
  2. Features & baseline → Determine relevant features and establish a baseline model.
  3. Model choice and why → Select a model suitable for classification.
  4. Metric that matches the cost of errors → Choose metrics that reflect the business impact of false positives/negatives.
  5. Overfitting checks → Validate model performance and ensure generalization.

The answer

1. Frame the problem:

  • The objective is to predict customer churn to implement retention strategies.
  • Define churn as a customer who has stopped using the service for a specified period.

2. Features & baseline:

  • Features may include customer demographics, usage patterns, and interaction history.
  • A baseline model could be a simple logistic regression using historical average churn rate.

3. Model choice and why:

  • Choose models like Random Forest or Gradient Boosting for their ability to handle non-linear relationships and feature interactions.

4. Metric that matches the cost of errors:

  • Precision: Important if the cost of false positives is high (e.g., offering discounts to non-churning customers).
  • Recall: Critical if the cost of false negatives is high (e.g., missing out on retaining actual churners).
  • F1 Score: Balances precision and recall, useful when both false positives and negatives are costly.
  • AUC-ROC: Measures the model's ability to distinguish between classes, useful for comparing models.

5. Overfitting checks:

  • Use cross-validation to assess model performance on unseen data.
  • Monitor validation vs. training error to detect overfitting.
  • Implement regularization techniques if necessary.

Why this works

  • Testing understanding of business impact: The interviewer wants to see if you can align model evaluation with business goals.
  • Sanity check: A strong answer identifies the trade-off between false positives and negatives, which is crucial for churn prediction.
  • Weak answers fail: Candidates who only mention accuracy miss the nuanced cost of errors in business terms.
  • Specificity: The answer should reflect an understanding of the specific business context and the implications of churn.

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