Sprinklr interview questions

156 questions from 23 interviews · updated from reports 2015-2024

Practise Sprinklr-style

About

Sprinklr is a software company that provides a platform for customer experience management, including social media, marketing, advertising, research, and customer service tools. In India, it is commonly seen hiring Software Engineers, Product Engineers, and Software Engineering Interns.

The roles that come up most are Software Engineer, Product Engineer and Software Engineering Intern. This covers 23 candidate interviews reported from 2015 to 2024. Most sat it at entry level (14 of 23 that recorded a level), with 8 internship interviews alongside. Among the 20 that recorded either route, arrivals split between campus drives (18, 90%) and off-campus applications (2, 10%). Most questions fall under DSA and CS fundamentals.

Category
Difficulty
Round

Interview questions

Q. Count the number of connected components in an undirected graph.

asked 2xeasyGraphsOnline test, Technical2021-2023

Ans. Use DFS or BFS from every unvisited vertex, and count how many searches you start. Store the graph as an adjacency list and keep a visited set or boolean array. Each search marks one whole connected component. The time complexity is O(V + E), and the space complexity is O(V).

Q. Design a Chess game/system.

asked 1xmediumObject oriented designTechnical2020

Ans. Model the game with a Game object holding players, board state, turn, clocks, move history and result. Represent the board as 64 squares containing pieces, and put move generation and validation in piece or rules services. The key detail is enforcing legal moves, including check, castling, en passant, promotion and draw conditions.

Q. Design a URL shortening service.

asked 1xmediumScalable systemsTechnical2020

Ans. Use an API service that creates a unique short code for each long URL, stores the mapping, and redirects requests by looking up the code. Generate IDs with a distributed counter or Snowflake-style ID encoded in Base62 to avoid collisions. Store mappings in a key-value database, cache hot links, and track expiry, ownership, and click metrics asynchronously.

Q. Design and implement an LRU Cache.

asked 1xmediumDesignTechnical2021

Ans. Implement an LRU cache with a hash map from key to list node and a doubly linked list ordered by recent use. On get, return the value and move the node to the front. On put, update or insert at the front. If capacity is exceeded, remove the tail. Both operations are O(1).

Q. Explain Quick Sort and its working.

asked 1xmediumSortingTechnical2023

Ans. Quick Sort is a divide-and-conquer sorting algorithm that chooses a pivot, partitions the array so smaller elements go before it and larger elements after it, then recursively sorts both sides. Its key step is efficient partitioning. Average time complexity is O(n log n), worst case is O(n²), and it is usually in-place.

Q. Explain and perform AVL tree rotations.

asked 1xmediumTreesTechnical2019

Ans. AVL rotations restore balance by making the heavier child the new subtree root while preserving in-order order. For left-left, rotate right; for right-right, rotate left; for left-right, rotate left on the child then right; for right-left, rotate right on the child then left. Update heights after each rotation.

Q. Implement vector data structure in C++.

asked 1xmediumOOPTechnical2023

Ans. Implement it as a dynamic array owning a contiguous heap buffer, with size and capacity fields. On push, place the element if capacity remains; otherwise allocate a larger buffer, usually double capacity, move or copy elements, then free the old buffer. Indexing is O(1), push_back is amortised O(1), insertion or deletion in the middle is O(n).

Q. Serialize and deserialize a binary tree

asked 1xmediumTreesTechnical2024

Ans. Serialize the tree using preorder traversal and record null children with a sentinel, then deserialize by reading the values back in the same order. Use a list or stream of tokens and a recursive index or queue. Each node and null marker is processed once, so time is O(n) and space is O(n).

Q. Count unique paths in a grid with obstacles.

asked 1xmediumDynamic programmingTechnical2024

Ans. Use dynamic programming, where each cell stores the number of ways to reach it from the top-left. If a cell has an obstacle, its value is zero; otherwise it is the sum of the top and left values. A one-dimensional array per row is enough, giving O(mn) time and O(n) space.

Q. Find the boundary traversal of a binary tree

asked 1xmediumTreesTechnical2024

Ans. Boundary traversal is usually root, left boundary, all leaves, then right boundary in reverse order. Add the root if it is not null, collect left boundary excluding leaves, collect leaves by DFS left to right, then collect right boundary excluding leaves and append it reversed. This avoids duplicates. Time complexity is O(n).

Q. Multiply two numbers represented as strings.

asked 1xmediumStringsTechnical2023

Ans. Use grade school multiplication: create an integer array of length m + n to store digit products and carries. For each digit in the first string, multiply each digit in the second from right to left, add into the correct positions, and normalise carries. Strip leading zeroes. Time complexity is O(mn), space is O(m + n).

Q. Find the median of a running stream of numbers.

asked 1xmediumHeapsOnline test2020

Ans. Use two heaps: a max heap for the lower half and a min heap for the upper half. Insert each number into the correct heap, then rebalance so their sizes differ by at most one. The median is the larger heap’s top, or the average of both tops. Insertion is O(log n), median lookup is O(1).

Q. Implement the Longest Common Substring problem.

asked 1xmediumDynamic programmingTechnical2021

Ans. Use dynamic programming where dp[i][j] stores the length of the common suffix ending at s1[i - 1] and s2[j - 1]. If the characters match, set it to dp[i - 1][j - 1] + 1, otherwise 0. Track the maximum length and end position. Time is O(nm), space can be O(m).

Q. Last Moment Before All Ants Fall Out of a Plank

asked 1xmediumSimulationTechnical2023

Ans. The last moment is the maximum time any ant needs to reach an edge: max of each left-moving ant’s position and each right-moving ant’s n minus position. Collisions can be ignored because two equal-speed ants bouncing is equivalent to them passing through each other. Use simple iteration, no extra data structure, O(L + R) time.

Q. Check whether a given graph is bipartite or not.

asked 1xmediumGraphsOnline test2021

Ans. Use BFS or DFS to colour each vertex with one of two colours, and if any edge connects two vertices with the same colour, the graph is not bipartite. Start a new search from every unvisited vertex to handle disconnected graphs. Use an array or map for colours. Time complexity is O(V + E).

Q. Explain AVL trees and how they maintain balance.

asked 1xmediumTreesTechnical2020

Ans. An AVL tree is a self-balancing binary search tree where each node keeps the heights of its left and right subtrees within one of each other. After every insertion or deletion, it updates height information and checks the balance factor. If a node becomes unbalanced, rotations restore balance, keeping search, insert and delete at O(log n).

Q. What happens when you type a URL into a browser?

asked 1xmediumNetworkingTechnical2020

Ans. The browser resolves the domain to an IP address, connects to the server, requests the page, receives the response, and renders it. The key steps are DNS lookup, TCP connection, TLS handshake for HTTPS, HTTP request and response, then parsing HTML, fetching CSS and JavaScript, building the DOM and painting the page.

Q. Prove that the sum of twin primes is divisible by 6

asked 1xmediumNumber theoryTechnical2024

Ans. For any twin primes greater than 3, write them as p and p+2. Every prime greater than 3 is odd, so their sum 2p+2 is even. Also primes greater than 3 are 1 or 5 modulo 6. Twin primes must be 5 and 1 modulo 6, so their sum is 0 modulo 6. The exception is 3 and 5.

Q. Explain OS scheduling algorithms and their applications

asked 1xmediumOperating systemsTechnical2017

Ans. OS scheduling algorithms decide which ready process gets the CPU, balancing throughput, response time, fairness and deadlines. FCFS suits simple batch work, SJF minimises average waiting when burst times are known, Round Robin suits interactive systems, priority scheduling handles importance, multilevel feedback queues adapt to behaviour, and EDF or rate monotonic scheduling serves real-time tasks.

Q. Find the kth smallest element from a stream of numbers.

asked 1xmediumHeapsTechnical2020

Ans. Use a max heap of size k. Insert numbers until it has k elements; after that, compare each new number with the heap root. If it is smaller, remove the root and insert the new number. The root is then the kth smallest. Each update costs O(log k) time and O(k) space.

Q. Find the Longest Palindromic Substring in a given string.

asked 1xmediumStringsTechnical2020

Ans. Use expand around centres: for each index, expand once for an odd-length palindrome and once between indices for an even-length palindrome, tracking the best start and length. The key detail is handling both centre types. This uses only a few variables, runs in O(n squared) time, and uses O(1) extra space.

Q. How would you approach designing a mobile phone for a user?

asked 1xmediumProduct designTechnical2017

Ans. I would start by understanding the target user, their daily tasks, budget, environment, accessibility needs, and pain points, then translate that into product requirements. The most important detail is prioritisation: a phone for a student, field worker, or elderly user will make different trade-offs in battery, durability, camera, performance, and simplicity.

Q. Check whether a given graph can be divided into two cliques.

asked 1xmediumGraphsTechnical2020

Ans. A graph can be divided into two cliques if and only if its complement graph is bipartite. Build the complement by adding an edge between every pair of vertices that is not adjacent in the original graph, then run BFS or DFS two-colouring on it. Use an adjacency matrix for fast checks. Time complexity is O(V^2).

Q. Explain B Trees and B+ Trees and differentiate between them.

asked 1xmediumTreesTechnical2020

Ans. B Trees and B+ Trees are balanced multiway search trees used for indexing large data on disk. In a B Tree, keys and values can be stored in internal and leaf nodes. In a B+ Tree, internal nodes store only keys, while all values are in linked leaf nodes, making range queries faster.

Q. Check if one binary tree is a subtree of another binary tree.

asked 1xmediumTreesTechnical2020

Ans. Traverse the larger tree and, at each node with the same value as the smaller tree’s root, check whether the two trees are identical in both structure and values. Use recursive DFS for traversal and comparison. The simple approach takes O(nm) worst case time and O(h) recursion space.

Q. Find the Longest Common Subsequence (LCS) between two strings.

asked 1xmediumDynamic programmingOnline test2020

Ans. Use dynamic programming with a 2D table where dp[i][j] stores the LCS length for the first i characters of one string and first j of the other. If characters match, add one from dp[i-1][j-1]; otherwise take the maximum of top or left. Time and space are O(nm).

Q. Find the maximum size sub-matrix with all 1s in a binary matrix

asked 1xmediumDynamic programmingOnline test2017

Ans. Use dynamic programming to find the largest square sub-matrix of 1s. Let dp[i][j] be the size of the largest all-1 square ending at cell i,j. If matrix[i][j] is 1, dp[i][j] is 1 plus the minimum of top, left and top-left. Track the maximum. Time is O(rows × cols).

Q. Find the number of pairs (x, y) in an array such that x^y > y^x.

asked 1xmediumArraysTechnical2020

Ans. Sort the second array and, for each x, count y values greater than x using binary search, then adjust for special cases. Precompute counts of y equal to 0, 1, 2, 3 and 4. Rules for 0 and 1 are exceptional, and pairs involving 2, 3 and 4 need correction. Time complexity is O((n + m) log m).

Q. Implement insert and search operations in a Trie data structure.

asked 1xmediumTreesTechnical2020

Ans. Use a Trie node with a children map or fixed array and a boolean isEnd flag. To insert, start at the root, create missing child nodes for each character, then mark the last node as isEnd. To search, follow each character; return false if missing, otherwise return the final node’s isEnd. Both take O(L) time.

Q. Validate whether a given binary tree is a valid Binary Search Tree

asked 1xmediumTreesTechnical2021

Ans. Validate it by doing a depth first traversal while carrying the valid value range for each node. Each node must be strictly greater than its lower bound and strictly less than its upper bound. Recurse left with the current value as the upper bound, and right with it as the lower bound. Time is O(n), space is O(h).

Q. Explain automation framework architecture and related code snippets

asked 1xmediumTesting toolsTechnical2021

Ans. An automation framework is usually layered into tests, business flows, page or API objects, utilities, test data, configuration, reporting, and CI integration. Code snippets should show small examples of reusable actions, assertions, and setup rather than duplicated test logic. The key detail is separation of concerns, so tests stay readable and maintenance stays localised.

Q. Explain various page replacement algorithms used in operating systems.

asked 1xmediumOperating systemsTechnical2020

Ans. Page replacement algorithms choose which memory page to evict when a page fault occurs and no free frame exists. Common ones are FIFO, which removes the oldest page, LRU, which removes the least recently used page, Optimal, which removes the page needed farthest in future, and Clock, an efficient approximation of LRU using reference bits.

Q. Solve Three displays with minimum total cost.

asked 1xmediumDynamic programmingTechnical2020

Ans. Use each display as the middle one, and find the cheapest valid smaller display before it and larger display after it. For every j, scan i < j with s[i] < s[j] for the minimum left cost, and k > j with s[k] > s[j] for the minimum right cost. Minimise their sum. Use arrays only, O(n²).

Q. Design a stack that supports getMin() in O(1) time and O(1) extra space.

asked 1xmediumStackTechnical2020

Ans. Use one stack plus a variable currentMin. When pushing a value smaller than currentMin, store an encoded value such as 2*x - currentMin and update currentMin to x. When popping an encoded value, restore the previous minimum as 2*currentMin - encoded. Push, pop, top and getMin are all O(1).

Q. 3 bulbs and 3 switches puzzle: determine which switch controls which bulb

asked 1xmediumLogical reasoningTechnical2021

Ans. Turn on switch 1 for a few minutes, then turn it off. Turn on switch 2 and leave switch 3 off. Enter the room once. The lit bulb belongs to switch 2. Of the two unlit bulbs, the warm one belongs to switch 1, and the cold one belongs to switch 3.

Q. Explain Virtual Memory and whether it is implemented in operating systems.

asked 1xmediumOperating systemsTechnical2020

Ans. Virtual memory is a memory management technique implemented by operating systems with support from the CPU’s memory management unit. It gives each process its own virtual address space, mapped to physical RAM using page tables. It also allows pages to be moved to disk, enabling isolation, protection, and running programs larger than available RAM.

Q. Find the left view and bottom view of a binary tree in a single traversal.

asked 1xmediumTreesTechnical2020

Ans. Use one level order traversal, storing each node with its level and horizontal distance. For the left view, record the first node seen at each level. For the bottom view, overwrite the value for each horizontal distance as traversal proceeds. Use a queue and a map. Time is O(n), space is O(n).

Q. Find the nth Ugly Number (numbers whose only prime factors are 2, 3, and 5).

asked 1xmediumDynamic programmingOnline test2020

Ans. Use dynamic programming with three pointers for multiples of 2, 3, and 5, generating ugly numbers in sorted order until the nth value. Start with 1, take the minimum next candidate each step, and advance every pointer that matches it to avoid duplicates. This runs in O(n) time and O(n) space.

Q. Identify performance issues in a given web application by reviewing its code.

asked 1xmediumFrontend performanceTechnical2020

Ans. I would identify performance issues by tracing expensive paths in the code, especially database access, network calls, rendering loops, and repeated work. The most important detail is to look for operations that scale badly with input size, such as N+1 queries, unbounded loops, missing indexes, large payloads, and unnecessary synchronous blocking.

Q. Design and code a system to find the top K restaurants near a user's location.

asked 1xmediumDesignTechnical2015

Ans. Use a spatial index, such as geohash or an R-tree, to fetch nearby restaurant candidates, then compute exact distances and keep the best K in a max-heap. Query the user’s cell and neighbouring cells, expanding until no closer unseen cell can exist. Time is about O(log N + M log K), where M is candidates checked.

Q. Evaluate complex mathematical expressions under modulus arithmetic efficiently

asked 1xmediumMathOnline test2017

Ans. Evaluate the expression while parsing it, reducing every intermediate result modulo M, and use fast modular exponentiation for powers. The key detail is handling division only when the denominator has a modular inverse, usually via Fermat’s theorem if M is prime. A stack or expression tree gives O(n log e) time overall.

Q. Manipulate given data following specified steps and print the output efficiently

asked 1xmediumArraysOnline test2017

Ans. Simulate the specified steps exactly, while choosing data structures that make each operation efficient. Parse the input once, store the data in arrays, maps, sets, stacks or queues as required, and avoid repeated full scans. Build the final output in a buffer and print once. Time complexity should match the total cost of the operations.

Q. Find the maximum (or minimum) of all subarrays of size k in an array in O(n) time.

asked 1xmediumSliding windowTechnical2020

Ans. Use a monotonic deque of indices to keep the best candidate for the current window. For maximums, keep values in decreasing order; for minimums, increasing order. Remove indices outside the window from the front, remove worse candidates from the back, and output the front for each full window. This is O(n).

Q. Given a string, find the maximum length of a substring with all unique characters.

asked 1xmediumStringsTechnical2021

Ans. Use a sliding window with two pointers and a set or map to track characters currently in the window. Move the right pointer to expand, and when a duplicate appears, move the left pointer until the duplicate is removed. Track the largest window size seen. This runs in O(n) time.

Q. Find K pairs with the largest sums from two arrays, with time complexity O(n log n).

asked 1xmediumArraysOnline test2023

Ans. Sort both arrays in descending order, then use a max heap storing sum and index pair. Start with indices 0,0. Repeatedly pop the largest pair, output it, then push its next two neighbours if not already visited. Sorting costs O(n log n), and for K up to n the heap work also fits O(n log n).

Q. Count the number of balanced bracket sequences using n opening and n closing brackets.

asked 1xmediumDynamic programmingTechnical2020

Ans. The number of balanced bracket sequences using n opening and n closing brackets is the nth Catalan number: Cn = (1 / (n + 1)) × binomial(2n, n). The key condition is that every prefix must have at least as many opening brackets as closing brackets. It can also be computed by a simple DP recurrence.

Q. Implement a HashMap data structure with insert and find operations using a hash function.

asked 1xmediumDs implementationTechnical2020

Ans. Use an array of buckets, compute index = hash(key) mod capacity, and store key value pairs in that bucket. For collisions, use chaining with a list. Insert searches the bucket to update or append. Find hashes the key and scans its bucket. Average time is O(1), worst case O(n).

Q. Poison and Rat puzzle: Determine which rat is poisoned using the minimum number of tests.

asked 1xmediumLogical reasoningTechnical2015

Ans. The minimum is ⌈log2 n⌉ tests for n rats, assuming each test can tell whether the poisoned rat is in a chosen group. Number the rats in binary. For test i, include every rat whose binary label has bit i set. The pattern of positive and negative results is the binary number of the poisoned rat.

Q. Print all permutations of a vector with distinct elements and then with duplicate elements.

asked 1xmediumBacktrackingTechnical2019

Ans. Use backtracking. For distinct elements, fix one position at a time by swapping each remaining element into it, recurse, then swap back. For duplicates, first sort the vector and at each depth skip an equal value already used there, or use a frequency map. Time is O(n times number of permutations), space O(n).

Q. Optimize a double loop computing sum of (i XOR j) for i in [A,B] and j in [C,D], modulo 1e9+7.

asked 1xmediumBit manipulationTechnical2020

Ans. Compute the answer bit by bit: for each bit k, count how many numbers in [A,B] and [C,D] have that bit set. Its contribution is 2^k times pairs where the bit differs: ones1 * zeros2 + zeros1 * ones2. Count set bits in a range using periodic blocks. Time complexity is O(log maxValue).

Q. Design and implement a file system supporting creation and deletion of files and folders in C++

asked 1xmediumFile systemTechnical2024

Ans. Use a tree where each directory node stores a hash map from name to child node, and each node records its name, type, parent pointer and optional file content or metadata. Create walks the path, adding the final node if the parent exists. Delete finds the node, removes it from its parent map, and recursively frees children. Operations are O(path components).

Q. Given huge data (>10TB), find all the documents which contain the string "Sachin plays cricket".

asked 1xmediumSearchTechnical2015

Ans. Build a distributed inverted index with term positions, then run a phrase query for “Sachin plays cricket”. Tokenise documents, store for each term the document ids and positions, shard the index across machines, and intersect postings for Sachin, plays, and cricket where positions are consecutive. This avoids scanning 10TB for every query.

Q. Find the minimum number of steps required for a knight to reach a target position on a chessboard

asked 1xmediumGraphsTechnical2021

Ans. Use breadth first search from the knight’s start position, because each move has equal cost and BFS reaches the target in the minimum number of moves. Store each square with its distance in a queue, mark visited squares, and try the eight knight moves within board limits. Time and space complexity are O(N²).

Q. Mobile Numeric Keypad Problem: Count possible numbers of given length using a mobile numeric keypad.

asked 1xmediumDynamic programmingTechnical2015

Ans. Use dynamic programming over the keypad graph, where each digit can move to itself and its valid up, down, left, or right neighbours. Keep counts for numbers ending at each digit. For each length, update each digit from its neighbours. Sum all digit counts at length n. Time is O(n) and space is O(1).

Q. Search for an element in a row-wise sorted 2D matrix and analyze time complexity for different cases

asked 1xmediumBinary searchTechnical2021

Ans. Search each row with binary search, because only row-wise sorting is guaranteed. For an m by n matrix, the worst case is O(m log n) when the element is absent or in the last checked row. Best case is O(log n) if it is found in the first row. Space is O(1).

Q. A couple has two children, and one of them is a boy. What is the probability that the other child is also a boy?

asked 1xmediumProbabilityTechnical2021

Ans. The probability is 1/3. List the equally likely ordered possibilities for two children: boy-boy, boy-girl, girl-boy, girl-girl. Knowing at least one child is a boy removes girl-girl, leaving three possible cases. Only one of those, boy-boy, has the other child also being a boy.

Q. Best Time to Buy and Sell Stock III.

asked 1xhardDynamic programmingTechnical2020

Ans. Use dynamic programming with four running states: best after first buy, first sell, second buy, and second sell. For each price, update these in order using the previous best values. The key detail is that the second buy uses profit from the first sell. This uses constant space and runs in O(n) time.

Q. Design test scenarios and test cases for a pen

asked 1xunknownQuality assuranceTechnical2021

Ans. A strong answer starts by clarifying pen type and requirements, then groups scenarios: functional writing, usability, reliability, safety, compatibility, and edge cases. Emphasise coverage, prioritisation, assumptions, and measurable expected results. Interviewers listen for structured thinking, practical risk awareness, negative tests, and whether you consider real users, environments, and constraints.

Q. Tell me about an incident when you handled pressure and achieved your target.

asked 1xunknownConflict resolutionHR2020

Ans. Choose a real example with a clear deadline, high stakes, and a measurable target. Explain the pressure briefly, then focus on how you prioritised, stayed calm, communicated, and took action. Emphasise the result, such as meeting a deadline, hitting a number, or protecting quality. Interviewers listen for resilience, judgement, and ownership.

Q. Design test scenarios and test cases for the WhatsApp application including API testing

asked 1xunknownQuality assuranceTechnical2021

Ans. A strong answer should pick core WhatsApp flows: registration, contacts sync, one to one chat, groups, media, calls, status, notifications, backup and privacy. Emphasise positive, negative, edge, performance, security and cross platform cases. For API testing, mention auth, request validation, rate limits, message delivery states, error handling and contract checks.

Showing 60 of 156 questions. Ranked by how often the same question came back across interviews.

Practise a Sprinklr-style interview

A spoken interview built from these questions, scored when you finish; the feedback is yours.

Start practising

When you are ready, record The One: a single interview hiring teams watch, so you stop repeating first rounds.

Common questions

What questions does Sprinklr ask?

Candidate interviews most often cover DSA (62%) and CS fundamentals (25%).

How many rounds does Sprinklr interview have?

Candidate interviews show an average of 3.7 rounds per experience, with a typical sequence of Online test → Technical → Technical → HR. Individual interview paths can vary.

Is the Sprinklr interview hard?

Among questions with a recorded difficulty, the mix is easy 31%, medium 60%, hard 9%.