ZopSmart interview questions & answers

14 real ZopSmart interview questions with full model answers — Coding. Drawn from the same verified bank ChannelPulse drills from (14 ZopSmart questions in total).

CodingEasyZopSmartSoftware Engineer

1. Hexadecimal and Hexatrigesimal Conversion (LeetCode)

Model answer

The task

The title suggests representing an integer in hexadecimal (base 16) and hexatrigesimal (base 36). The precise input/output contract is unclear, so the solution below provides a generic conversion utility; it uses lowercase digits and a leading minus sign for negative values.

Key idea

Repeatedly divide the number by the target base. The remainders give the digits from right to left, so reverse them at the end. Handle zero separately because it produces no remainders.

Approach

  1. Define the digit symbols 0 through 9, then a through z.
  2. For each requested base, return "0" if the value is zero.
  3. Record the sign and repeatedly collect remainders from the absolute value.
  4. Reverse the collected digits and prepend the sign when needed.
  5. Convert using bases 16 and 36.
def to_base(n: int, base: int) -> str:
    """Convert an integer to a base from 2 through 36."""
    if not 2 <= base <= 36:
        raise ValueError("base must be between 2 and 36")

    digits = "0123456789abcdefghijklmnopqrstuvwxyz"

    if n == 0:
        return "0"

    sign = "-" if n < 0 else ""
    value = abs(n)
    result = []

    while value > 0:
        value, remainder = divmod(value, base)
        result.append(digits[remainder])

    return sign + "".join(reversed(result))

def representations(n: int) -> tuple[str, str]:
    """Return the base-16 and base-36 representations of n."""
    return to_base(n, 16), to_base(n, 36)

Complexity:

  • Time: O(log |n|) per base, since each division reduces the value by that base.
  • Space: O(log |n|) for the output digits.

Common follow-ups

  • What if uppercase output is required? Convert the result to uppercase, or use uppercase digit symbols.
  • What if negative values use fixed-width two’s complement? Choose a bit width, mask the value to that width, then convert the masked value.
  • How would you support bases above 36? Use a larger symbol alphabet or represent each digit with a separate numeric value.
CodingEasyZopSmartSoftware Engineer

2. Valid Anagram (LeetCode)

Model answer

The task

Determine whether two strings contain the same characters with the same frequencies, regardless of order.

Key idea

Anagrams have identical character counts. Count the characters in each string and compare the resulting frequency maps.

Approach

  1. If the strings have different lengths, return False.
  2. Build a frequency map for each string.
  3. Return whether the maps are equal.
from collections import Counter

class Solution:
    def isAnagram(self, s: str, t: str) -> bool:
        # Different lengths cannot have matching character counts.
        if len(s) != len(t):
            return False

        # Anagrams have exactly the same character frequencies.
        return Counter(s) == Counter(t)

Complexity:

  • Time: O(n), where n is the length of either string; counting and comparison are linear.
  • Space: O(k), where k is the number of distinct characters stored in the frequency maps.

Common follow-ups

  • Can you do this without two maps? Update one frequency map using s, then decrement counts using t; verify all counts return to zero.
  • What if the input is guaranteed to contain only lowercase English letters? Use a fixed-size array of 26 counters instead of maps.
  • What if sorting is allowed? Sort both strings and compare them; this takes O(n log n) time.
CodingMediumZopSmartSoftware Engineer

3. Restore IP Addresses (LeetCode)

Model answer

The task

Given a string of digits, insert three dots to form all valid IPv4 addresses. Each address has four numeric parts from 0 to 255, and a part may not have leading zeros unless it is exactly "0".

Key idea

Build the address one part at a time with backtracking. Each part can contain only one to three digits, so there are at most three choices per step; reject invalid parts immediately.

Approach

  1. Start at the beginning of the string with no parts selected.
  2. Before branching, check whether the remaining digits can fit into the remaining parts.
  3. Try taking one, two, or three digits for the next part.
  4. Skip parts with leading zeros or values above 255.
  5. When four parts are selected, add the address if all digits were used.
class Solution:
    def restoreIpAddresses(self, s: str) -> list[str]:
        result = []
        parts = []

        def backtrack(start: int) -> None:
            parts_left = 4 - len(parts)
            digits_left = len(s) - start

            # Each remaining part must use 1 to 3 digits.
            if not (parts_left <= digits_left <= 3 * parts_left):
                return

            if parts_left == 0:
                if start == len(s):
                    result.append(".".join(parts))
                return

            for length in range(1, 4):
                end = start + length
                if end > len(s):
                    break

                part = s[start:end]

                # Multi-digit parts cannot start with zero.
                if length > 1 and part[0] == "0":
                    continue
                if int(part) > 255:
                    continue

                parts.append(part)
                backtrack(end)
                parts.pop()

        backtrack(0)
        return result

Complexity:

  • Time: O(R), where R is the number of returned addresses; only four parts are chosen, each with at most three candidate lengths.
  • Space: O(R) for the results, plus O(1) auxiliary space because the recursion depth is at most four.

Common follow-ups

  • How would you count addresses without returning them? Increment a counter at each valid complete address instead of storing it.
  • Can the pruning be improved? The bounds check already rejects states where the remaining digits cannot fit into the remaining parts.
  • What if the address format changes? Parameterize the number of parts, maximum part length, and maximum numeric value.
  • How would you support IPv6? Use the same backtracking pattern, but validate hexadecimal groups and the IPv6-specific formatting rules.
CodingMediumZopSmartSoftware Engineer

4. Reverse Nodes in Even Length Groups (LeetCode)

Model answer

The task

Given a singly linked list, divide its nodes into consecutive groups with target sizes 1, 2, 3, and so on. Reverse each group whose actual size is even, including a final group that may be shorter than its target size.

Key idea

Process one group at a time, first counting how many nodes it actually contains. For an even-sized group, reverse its links in place and reconnect it to the surrounding list.

Approach

  1. Use a dummy node to simplify handling the list head.
  2. Track the node before the current group and the group’s target size.
  3. Count up to that many nodes, stopping at the end of the list.
  4. If the actual count is even, reverse those nodes and reconnect the group.
  5. Advance to the next group, increasing the target size.
from typing import Optional

# ListNode is provided by the platform.
class Solution:
    def reverseEvenLengthGroups(
        self, head: Optional["ListNode"]
    ) -> Optional["ListNode"]:
        dummy = ListNode(0)
        dummy.next = head

        group_prev = dummy
        group_size = 1

        while group_prev.next is not None:
            # Find the end of this group and count its actual nodes.
            group_end = group_prev
            count = 0
            while count < group_size and group_end.next is not None:
                group_end = group_end.next
                count += 1

            if count % 2 == 0:
                group_start = group_prev.next
                after_group = group_end.next

                # Reverse this group, linking its old head to the next group.
                prev = after_group
                curr = group_start
                for _ in range(count):
                    next_node = curr.next
                    curr.next = prev
                    prev = curr
                    curr = next_node

                group_prev.next = group_end
                group_prev = group_start  # The old head is now the group's tail.
            else:
                group_prev = group_end

            group_size += 1

        return dummy.next

Complexity:

  • Time: O(n), since each node is visited a constant number of times.
  • Space: O(1), since the list is modified in place.

Common follow-ups

  • How would you reverse odd-sized groups instead? Change the parity check to count % 2 == 1.
  • What if groups had a fixed size k? Use k as the target size for each group.
  • Can this be done recursively? Yes, but recursion may use O(n) stack space in the worst case.
CodingMediumZopSmartSoftware Engineer

5. Reverse Words in a String (LeetCode)

Model answer

The task

Return the words of a string in reverse order, with exactly one space between words and no leading or trailing spaces. Treat any run of whitespace as a separator.

Key idea

Reverse the entire character array, then reverse each word to restore its letters. While scanning, compact words in place and write only one space between them.

Approach

  1. Convert the string to a mutable character array and reverse it.
  2. Scan past whitespace to find each word.
  3. Reverse the letters within that word.
  4. Copy the word to the next write position, inserting one space if needed.
  5. Join the compacted portion of the array.
class Solution:
    def reverseWords(self, s: str) -> str:
        chars = list(s)
        n = len(chars)

        def reverse(left: int, right: int) -> None:
            while left < right:
                chars[left], chars[right] = chars[right], chars[left]
                left += 1
                right -= 1

        # Reversing the whole string puts the words in reverse order.
        reverse(0, n - 1)

        read = 0
        write = 0

        while read < n:
            # Skip any whitespace between words.
            while read < n and chars[read].isspace():
                read += 1

            if read == n:
                break

            start = read

            # Find the end of the current word.
            while read < n and not chars[read].isspace():
                read += 1

            end = read - 1
            reverse(start, end)

            # Keep exactly one space between output words.
            if write > 0:
                chars[write] = " "
                write += 1

            # Compact this word into the output prefix.
            for i in range(start, end + 1):
                chars[write] = chars[i]
                write += 1

        return "".join(chars[:write])

Complexity:

  • Time: O(n), where n is the string length.
  • Space: O(n) for the mutable character array.

Common follow-ups

  • How would you handle only ordinary spaces as separators? Replace isspace() with comparisons to " ".
  • Can this be done in place? The character operations are in place, but Python strings are immutable, so the array requires O(n) space.
  • What if the input is a stream too large to fit in memory? Use an external or chunked representation, while preserving word boundaries between chunks.
CodingMediumZopSmartSoftware Engineer

6. Letter Combinations of a Phone Number (LeetCode)

Model answer

The task

Given a string of digits from 2 through 9, return every string formed by choosing the corresponding phone-keypad letter for each digit. If the input is empty, return an empty list.

Key idea

Build each string one character at a time using backtracking. For each digit, try every letter mapped to it, then undo that choice before trying the next one.

Approach

  1. Define the digit-to-letters mapping.
  2. Return an empty list if there are no digits.
  3. Use a recursive helper to track the current digit position and partial string.
  4. When the partial string has one letter per digit, add it to the results.
  5. Otherwise, recurse once for each letter mapped to the current digit.
class Solution:
    def letterCombinations(self, digits: str) -> list[str]:
        if not digits:
            return []

        letters = {
            "2": "abc",
            "3": "def",
            "4": "ghi",
            "5": "jkl",
            "6": "mno",
            "7": "pqrs",
            "8": "tuv",
            "9": "wxyz",
        }

        result = []
        current = []

        def backtrack(index: int) -> None:
            # A complete choice has one letter for every digit.
            if index == len(digits):
                result.append("".join(current))
                return

            # Try each possible letter for this digit.
            for letter in letters[digits[index]]:
                current.append(letter)
                backtrack(index + 1)
                current.pop()  # Undo the choice before trying another.

        backtrack(0)
        return result

Complexity:

  • Time: O(n · 4ⁿ), since there can be up to 4ⁿ combinations and building each takes O(n).
  • Space: O(n) auxiliary space for the recursion and current combination, excluding the output.

Common follow-ups

  • What if the input contains 0 or 1? Define their behavior explicitly, since they do not map to letters in the standard keypad mapping.
  • How would you avoid recursion? Build combinations iteratively, adding each digit’s letters to the partial results.
  • Can the results be generated lazily? Yield each completed combination from the recursive search instead of storing them all.
CodingMediumZopSmartSoftware Engineer

7. Decode String (LeetCode)

Model answer

The task

Decode a string where a number before brackets indicates how many times to repeat the bracketed section. Sections may be nested.

Key idea

Parse the input into a compact tree of literal fragments and repeat nodes instead of expanding nested sections immediately. Then traverse that tree to produce the decoded string, avoiding repeated copying of large intermediate strings.

Approach

  1. Scan the input, accumulating each repetition count.
  2. On an opening bracket, save the current fragment list and count, then start a new list.
  3. On a closing bracket, wrap the current list in a repeat node and add it to its parent.
  4. Traverse the resulting structure with an explicit stack, yielding literal fragments as they are needed.
  5. Join the yielded fragments into the result.
class Solution:
    def decodeString(self, s: str) -> str:
        # Each repeat node is a (count, fragments) tuple.
        current = []
        stack = []
        count = 0

        for char in s:
            if "0" <= char <= "9":
                count = count * 10 + int(char)
            elif char == "[":
                stack.append((current, count))
                current = []
                count = 0
            elif char == "]":
                parent, repeat = stack.pop()
                # Omit zero repetitions so traversal skips empty sections.
                if repeat:
                    parent.append((repeat, current))
                current = parent
            else:
                current.append(char)

        def fragments():
            # Frames contain a fragment list, its next index, and
            # how many times to traverse that list.
            frames = [[current, 0, 1]]

            while frames:
                parts, index, remaining = frames[-1]

                if index == len(parts):
                    remaining -= 1
                    if remaining == 0:
                        frames.pop()
                    else:
                        frames[-1][1] = 0
                        frames[-1][2] = remaining
                    continue

                node = parts[index]
                frames[-1][1] += 1

                if isinstance(node, str):
                    yield node
                else:
                    repeat, nested = node
                    frames.append([nested, 0, repeat])

        return "".join(fragments())

Complexity:

  • Time: O(n + m), where n is the encoded length and m is the decoded length.
  • Space: O(n + m) for the parsed structure and returned string.

Common follow-ups

  • How would you handle malformed input? Validate bracket balance and ensure each opening bracket has a preceding count.
  • How could this support streaming output? Yield decoded fragments to a consumer instead of joining them into one string.
  • What if the grammar adds escaping or other operators? Extend the parser with explicit rules and represent each operation as a distinct node.
CodingMediumZopSmartSoftware Engineer

8. Longest Palindromic Substring (LeetCode)

Model answer

The task

Given a string, return its longest contiguous substring that reads the same forward and backward. If several substrings have the same maximum length, returning any of them is acceptable.

Key idea

Every palindrome has a center: either a character (odd length) or the gap between two characters (even length). Expand outward from each possible center while the characters match, keeping track of the longest range found.

Approach

  1. Initialize the best range to an empty substring.
  2. For each character position, expand from that position to check odd-length palindromes.
  3. Also expand from the gap after that position to check even-length palindromes.
  4. When an expansion finds a longer palindrome, save its start and end indices.
  5. Return the substring covered by the saved range.
class Solution:
    def longestPalindrome(self, s: str) -> str:
        best_start = 0
        best_length = 0

        def expand(left: int, right: int) -> None:
            nonlocal best_start, best_length

            # Keep expanding while the current range is a palindrome.
            while left >= 0 and right < len(s) and s[left] == s[right]:
                length = right - left + 1
                if length > best_length:
                    best_start = left
                    best_length = length
                left -= 1
                right += 1

        for center in range(len(s)):
            expand(center, center)      # Odd-length palindromes
            expand(center, center + 1)  # Even-length palindromes

        return s[best_start:best_start + best_length]

Complexity:

  • Time: O(n²), since each of the O(n) centers can expand across O(n) characters.
  • Space: O(1), excluding the returned substring.

Common follow-ups

  • How can this be made linear time? Use Manacher’s algorithm to reuse information from previously explored centers.
  • How would you return all longest palindromic substrings? Track every range tied for the maximum length.
  • What if the input is empty? The method returns an empty string.
  • How would you count all palindromic substrings? Count each successful expansion instead of only saving the longest range.
CodingMediumZopSmartSoftware Engineer

9. Bulls and Cows (LeetCode)

Model answer

The task

Given two equal-length digit strings, count exact matches and misplaced matches. Format the result as the bull count followed by A and the cow count followed by B.

Key idea

Count exact matches directly. For all other positions, count each digit’s occurrences separately in the unmatched parts of both strings; the overlap of those counts gives the number of cows.

Approach

  1. Create one frequency array for each string, with ten slots for the digits 0 through 9.
  2. Scan the strings together, incrementing the bull count when digits match at the same position.
  3. For nonmatching positions, record each string’s digit in its respective frequency array.
  4. Sum the smaller frequency for each digit to count cows without counting any occurrence more than once.
  5. Format and return both counts.
class Solution:
    def getHint(self, secret: str, guess: str) -> str:
        bulls = 0
        secret_counts = [0] * 10
        guess_counts = [0] * 10

        for secret_digit, guess_digit in zip(secret, guess):
            if secret_digit == guess_digit:
                bulls += 1
            else:
                secret_counts[int(secret_digit)] += 1
                guess_counts[int(guess_digit)] += 1

        cows = sum(
            min(secret_counts[digit], guess_counts[digit])
            for digit in range(10)
        )

        return f"{bulls}A{cows}B"

Complexity:

  • Time: O(n), where n is the length of the strings.
  • Space: O(1), since the frequency arrays always have ten entries.

Common follow-ups

  • What if the strings use a larger character set? Use a hash map for frequencies instead of fixed-size arrays.
  • Can the solution use a single frequency array? Yes; track signed differences while scanning unmatched positions and count cows when a digit’s balance crosses zero.
  • What if the strings can have different lengths? Clarify the desired behavior first; this implementation assumes equal lengths.
CodingMediumZopSmartSoftware Engineer

10. Remove K Digits (LeetCode)

Model answer

The task

Given a nonnegative integer as a digit string, remove exactly k digits while keeping the remaining digits in their original order. Return the smallest possible resulting number, without leading zeroes; use "0" if no nonzero digits remain.

Key idea

Build the result from left to right using a monotonic increasing stack. When a new digit is smaller than the stack’s last digit, removing that larger digit makes the number smaller, so greedily remove it while removals remain.

Approach

  1. Start with an empty stack of digits.
  2. For each digit, pop larger digits from the stack while k > 0.
  3. Push the current digit.
  4. If removals remain after processing all digits, remove them from the end.
  5. Strip leading zeroes; return "0" if nothing remains.
class Solution:
    def removeKdigits(self, num: str, k: int) -> str:
        stack = []

        for digit in num:
            # A smaller current digit is better in an earlier position.
            while k > 0 and stack and stack[-1] > digit:
                stack.pop()
                k -= 1
            stack.append(digit)

        # If the digits were nondecreasing, remove from the right.
        if k > 0:
            stack = stack[:-k]

        # Normalize leading zeroes and handle an empty result.
        result = "".join(stack).lstrip("0")
        return result if result else "0"

Complexity:

  • Time: O(n), where n is the number of digits; each digit is pushed and popped at most once.
  • Space: O(n) for the stack holding the remaining digits.

Common follow-ups

  • What if k is at least the number of digits? The algorithm removes everything and returns "0".
  • Why remove larger digits before smaller ones? Earlier positions have greater place value, so reducing an earlier digit gives the largest improvement.
  • Can this be done without a stack? A mutable character list with a write index simulates the same greedy process.
CodingMediumZopSmartSoftware Engineer

11. Zigzag Conversion (LeetCode)

Model answer

The task

Rearrange a string by writing its characters across rows in a down-and-diagonal zigzag pattern, then return the rows concatenated from top to bottom.

Key idea

Simulate the movement through the rows as characters are read. Reverse direction at the top and bottom rows; each character is appended to its current row exactly once.

Approach

  1. If there is only one row, or the string is shorter than the row count, return it unchanged.
  2. Create one character buffer per row.
  3. Track the current row and whether movement is downward or upward.
  4. Append each character to its row, changing direction at either end.
  5. Join the row buffers in order.
class Solution:
    def convert(self, s: str, numRows: int) -> str:
        # With one row, the zigzag has no turns.
        if numRows == 1 or numRows >= len(s):
            return s

        rows = [[] for _ in range(numRows)]
        current_row = 0
        direction = 1  # 1 means moving down; -1 means moving up.

        for char in s:
            rows[current_row].append(char)

            # Turn around when reaching either end of the rows.
            if current_row == 0:
                direction = 1
            elif current_row == numRows - 1:
                direction = -1

            current_row += direction

        return "".join("".join(row) for row in rows)

Complexity:

  • Time: O(n), where n is the length of the string; each character is processed once.
  • Space: O(n), for the row buffers and the returned string.

Common follow-ups

  • Can you compute the row of each character directly? Yes; use the repeating zigzag cycle of 2 * numRows - 2 positions.
  • What if the input is streamed? Keep the row buffers and movement state, and process each incoming character in order.
  • What edge cases matter? A single row, an empty string, and a row count at least as large as the string length.
CodingMediumZopSmartSoftware Engineer

12. Broken Calculator (LeetCode)

Model answer

The task

Starting from a positive value, reach a target using only “double the value” and “subtract one” operations. Return the minimum number of operations.

Key idea

Work backward from the target. When it is even, the last operation can be undone by halving; when it is odd, undo a subtraction by adding one. Once the target is no greater than the starting value, only subtractions remain.

Approach

  1. Set the operation count to zero.
  2. While the target exceeds the starting value, add one if the target is odd.
  3. Otherwise, halve the target.
  4. Count each backward operation.
  5. Add the remaining difference, which corresponds to forward subtractions.
class Solution:
    def brokenCalc(self, startValue: int, target: int) -> int:
        operations = 0

        # Reverse the operations while the target is above the start.
        while target > startValue:
            if target % 2 == 1:
                # Undo a forward subtraction.
                target += 1
            else:
                # Undo a forward doubling.
                target //= 2
            operations += 1

        # Reach the remaining smaller target by subtracting in reverse.
        return operations + (startValue - target)

Complexity:

  • Time: O(log target), since halving reduces the target geometrically.
  • Space: O(1), using only a fixed number of variables.

Common follow-ups

  • What if doubling and subtracting have different costs? Compare the costs of available reverse choices; a greedy rule may no longer be optimal.
  • How does this behave when the target is smaller than the start? The answer is the direct difference, since only subtraction is needed.
  • What if values can exceed a fixed-width integer range? Use a sufficiently wide integer type or arbitrary-precision integers.
CodingHardZopSmartSoftware Engineer

13. Trapping Rain Water (LeetCode)

Model answer

The task

Given an array of nonnegative bar heights, compute how much water remains trapped between the bars after rainfall. Each bar has unit width.

Key idea

Water above a position is limited by the shorter of the tallest bars to its left and right. With two pointers, process the side whose current height is lower: its boundary already determines the maximum water that position can hold, so no arrays of prefix and suffix maxima are needed.

Approach

  1. Start pointers at both ends and track the greatest height seen from each side.
  2. While the pointers have not crossed, compare their current heights.
  3. If the left height is lower, update the left maximum and add any water above the left bar, then advance the left pointer.
  4. Otherwise, do the symmetric operation on the right.
  5. Return the accumulated water.
from typing import List

class Solution:
    def trap(self, height: List[int]) -> int:
        left, right = 0, len(height) - 1
        left_max = right_max = 0
        water = 0

        while left < right:
            if height[left] < height[right]:
                # The right side is tall enough that the left maximum
                # determines the water level at this position.
                left_max = max(left_max, height[left])
                water += left_max - height[left]
                left += 1
            else:
                # Symmetrically, the right maximum determines this level.
                right_max = max(right_max, height[right])
                water += right_max - height[right]
                right -= 1

        return water

Complexity:

  • Time: O(n), because each pointer moves across the array at most once.
  • Space: O(1), because the algorithm uses only a fixed number of variables.

Common follow-ups

  • How can this be solved with dynamic programming? Precompute the maximum height to each position from the left and right, then sum the trapped water at each position.
  • How can a monotonic stack solve it? Keep indices of decreasing bar heights; when a taller bar arrives, pop a basin bottom and calculate the bounded layer.
  • What if bars have different widths? Track each bar’s width and use area rather than unit-width contributions; the boundary logic must account for the resulting horizontal spans.
CodingHardZopSmartSoftware Engineer

14. Reverse Nodes in k-Group (LeetCode)

Model answer

The task

Rearrange a singly linked list by reversing each consecutive block of k nodes. If the final block has fewer than k nodes, leave it as it is.

Key idea

Before reversing a block, check that it contains all k nodes. Use the node after the block as the stopping point for pointer reversal, then connect the reversed block back to the list.

Approach

  1. Add a dummy node before the head to simplify reconnecting the first block.
  2. From the node before each block, locate its kth node. If none exists, stop.
  3. Save the node after the block, then reverse pointers up to that node.
  4. Connect the previous block to the reversed block and advance to its new tail.
  5. Return the node after the dummy.
class Solution:
    def reverseKGroup(self, head, k):
        # The dummy makes it easy to update the list's first node.
        dummy = ListNode(0, head)
        group_prev = dummy

        while True:
            # Find the last node in the next complete group.
            kth = group_prev
            for _ in range(k):
                kth = kth.next
                if kth is None:
                    return dummy.next

            group_next = kth.next

            # Reverse this group, stopping just before group_next.
            prev = group_next
            curr = group_prev.next
            while curr is not group_next:
                next_node = curr.next
                curr.next = prev
                prev = curr
                curr = next_node

            # The old first node is now the group's tail.
            old_first = group_prev.next
            group_prev.next = kth
            group_prev = old_first

Complexity:

  • Time: O(n), as each node is visited a constant number of times.
  • Space: O(1), using only a fixed number of pointers.

Common follow-ups

  • How would you implement this recursively? Reverse one group, then recursively process the remainder, taking care not to reverse an incomplete final group.
  • What happens when k is 1? Each group contains one node, so the list stays unchanged.
  • Can you reverse only complete groups? Yes; the initial k-node check ensures incomplete groups are untouched.

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