Info Edge Coding Round Questions
Last updated 2026-11-19
For a company built on search over jobs, resumes and listings, practice problems naturally centre on strings, hashing, tries, sorting and set operations, plus SQL on tables of jobs and applicants. This page works through eleven such problems with solutions in Python, Java and SQL, each with complexity and the mistakes that lose marks.
They are practice problems in the style of those topics and are not copied from any test. Read them alongside Info Edge interview questions and the DSA coding round guide.
| Languages here | Python, Java, SQL |
|---|---|
| Themes | Strings, hashing, tries, sorting, SQL |
| Level | Easy to medium with two hard |
Patterns that recur in search-style problems
Normalisation comes first: lowercase, trim, split. After that most problems reduce to a hash map from a key to a list or count, a trie for prefixes, or a sort followed by a linear sweep. Writing the key function (what makes two items "the same") is usually the hard part.
Hiring status
We hold no sourced information on Info Edge hiring drives, test formats or cutoffs, so none are stated. Check the company's own careers site for current openings.
Info Edge Coding Round Questions: questions with worked answers
1 Group anagrams. Given a list of skill strings, group the ones that are anagrams.
easyUse the sorted characters of each word as the dictionary key and append the word to that key's list. O(n * k log k) time for n words of length k, O(n * k) space. For lowercase letters only you can use a 26-length count tuple as the key to get O(n * k). Mistake: using the unsorted word as the key, or returning dictionary views instead of lists.
pythonfrom collections import defaultdict def group(words): d = defaultdict(list) for w in words: d[''.join(sorted(w))].append(w) return list(d.values()) print(group(["eat","tea","tan","ate","nat","bat"]))2 Remove duplicate resumes: given records by email, keep the first occurrence of each email (case-insensitive).
easyNormalise the key (strip and lowercase) and keep a set of seen keys while preserving order. O(n) time, O(n) space. Mistake: sorting first, which changes which record is "first", and comparing without normalising so "A@x.com" and "a@x.com" both survive.
pythondef dedupe(records): seen, out = set(), [] for email, name in records: key = email.strip().lower() if key not in seen: seen.add(key) out.append((email, name)) return out3 Implement a trie with insert, search and prefix listing for job-title autocomplete.
mediumEach node holds a dict of children and an end flag. Insert walks or creates nodes; autocomplete walks to the prefix node, then does a DFS collecting words. Insert and search are O(L); listing is O(size of the subtree). Memory is the cost: millions of titles need a compressed trie or a sorted array with binary search. Mistake: matching "car" as a word because "card" exists, i.e. forgetting the end flag.
pythonclass Trie: def __init__(self): self.root = {} def insert(self, w): n = self.root for ch in w: n = n.setdefault(ch, {}) n['$'] = True def starts_with(self, p): n = self.root for ch in p: if ch not in n: return [] n = n[ch] out = [] def dfs(node, acc): for k, v in node.items(): if k == '$': out.append(p + acc) else: dfs(v, acc + k) dfs(n, '') return sorted(out)4 Build an inverted index from documents and answer an AND query.
mediumMap each term to a sorted list of document ids. For an AND query, intersect the posting lists by walking them with two pointers, or intersect sets. Building is O(total tokens). Intersecting lists of sizes m and n is O(m + n) with the two-pointer method. Mistake: not lowercasing or deduplicating ids per document, which inflates postings.
pythonfrom collections import defaultdict def build(docs): idx = defaultdict(set) for i, text in enumerate(docs): for t in text.lower().split(): idx[t].add(i) return idx def query_and(idx, terms): sets = [idx.get(t.lower(), set()) for t in terms] return sorted(set.intersection(*sets)) if sets else [] idx = build(["Java backend developer", "Python developer", "Java Python"]) print(query_and(idx, ["java", "python"])) # [2]5 Top K frequent skills across resumes.
mediumCount skills in a Counter and use heapq.nlargest or a size-k min-heap. O(n log k). If k is close to the number of distinct skills, sorting is fine. Specify tie-breaking: ties sorted alphabetically give deterministic output. Mistake: counting a skill several times per resume when the question asks how many resumes contain it; add each skill from a set per resume.
pythonfrom collections import Counter import heapq def top_skills(resumes, k): cnt = Counter() for skills in resumes: cnt.update(set(skills)) return heapq.nsmallest(k, cnt, key=lambda s: (-cnt[s], s))6 Longest common prefix of a list of job-title strings.
mediumTake the first string as the candidate prefix and shorten it until every other string starts with it. O(total characters). An alternative is to compare the lexicographically smallest and largest strings only, since any common prefix of all strings is a prefix of both. Mistake: not handling an empty list or an empty string.
javapublic class Prefix { public static String lcp(String[] a) { if (a.length == 0) return ""; String p = a[0]; for (int i = 1; i < a.length; i++) { while (!a[i].startsWith(p)) p = p.substring(0, p.length() - 1); } return p; } }7 Employees who earn more than their manager (SQL).
mediumSelf-join the table: join each employee to the row whose id is their manager_id and compare salaries. Use an inner join, so employees with no manager are excluded. Mistake: joining on the wrong key direction or using a left join and forgetting the NULL salary comparison evaluates to unknown.
sqlSELECT e.name FROM employees e JOIN employees m ON e.manager_id = m.id WHERE e.salary > m.salary;8 Departments with more than three applicants shortlisted (GROUP BY with HAVING).
mediumFilter rows first with WHERE, group, then filter groups with HAVING since aggregates cannot appear in WHERE. COUNT(DISTINCT candidate_id) avoids duplicates when a person is shortlisted twice. Mistake: putting COUNT in WHERE or counting rows instead of distinct people.
sqlSELECT department, COUNT(DISTINCT candidate_id) AS shortlisted FROM applications WHERE status = 'shortlisted' GROUP BY department HAVING COUNT(DISTINCT candidate_id) > 3;9 Merge two sorted lists of job ids into one sorted list without duplicates.
mediumWalk both lists with two pointers, appending the smaller value and skipping it if equal to the last appended value. O(m + n) time and O(m + n) output space. Mistake: concatenating and sorting, which is O((m+n) log(m+n)) and ignores the sorted property.
pythondef merge_unique(a, b): i = j = 0 out = [] while i < len(a) or j < len(b): if j >= len(b) or (i < len(a) and a[i] <= b[j]): x = a[i]; i += 1 else: x = b[j]; j += 1 if not out or out[-1] != x: out.append(x) return out10 Minimum window substring: smallest part of a resume text that contains every required keyword character.
hardSlide a window with counts of needed characters. Expand the right edge until all requirements are met, then shrink from the left while still valid, recording the shortest. Keep a "missing" counter to check validity in O(1). O(n + m) time. Mistake: validating by comparing two full dictionaries on every step, which makes it O(n * alphabet), and not handling duplicate required characters.
pythonfrom collections import Counter def min_window(s, t): need = Counter(t) missing = len(t) best = (float('inf'), 0, 0) left = 0 for right, ch in enumerate(s): if need[ch] > 0: missing -= 1 need[ch] -= 1 while missing == 0: if right - left + 1 < best[0]: best = (right - left + 1, left, right + 1) need[s[left]] += 1 if need[s[left]] > 0: missing += 1 left += 1 return s[best[1]:best[2]] if best[0] != float('inf') else ""11 Word break: can a search phrase be segmented into words from a dictionary?
hardDynamic programming over prefixes: dp[i] is true if some j < i has dp[j] true and s[j:i] is in the dictionary. O(n^2) substring checks (O(n^3) if slicing cost is counted), O(n) space. Limit j to the maximum word length to cut work. Mistake: greedy longest-match, which fails for "abcd" with words ab, abc and cd: taking "abc" first leaves "d", while "ab" then "cd" works.
pythondef word_break(s, words): ws = set(words) dp = [True] + [False] * len(s) for i in range(1, len(s) + 1): for j in range(i): if dp[j] and s[j:i] in ws: dp[i] = True break return dp[-1]
Frequently asked questions
Which topics matter most for Info Edge style coding rounds?
Strings, hashing, sorting, tries, two pointers and SQL joins and grouping. Add dynamic programming basics for harder interviews.
Should I write SQL or code in the coding round?
Be ready for both. Database questions are common for backend roles at a company with data-heavy products.
Are these actual Info Edge questions?
No, they are practice problems in the style of the topics, not drawn from any real paper.
Python or Java for the coding test?
Choose whichever you are quicker in. Java users should know HashMap, PriorityQueue and StringBuilder well.
How do I check complexity?
Count nested loops and the cost of each built-in. Sorting is O(n log n), a hash lookup is O(1) on average, and string slicing is O(length).
Related guides
More in Company Interview Questions
- Infosys Coding Round Questions with Solutions
- Infosys Interview Questions for Freshers
- Intel Coding Round Questions with Solutions
- Intel Interview Questions and Answers for India Software Roles
- Intuit Coding Round Questions with Solutions in Python and Java
- Intuit Interview Questions and Answers for SDE-1 Roles
- JPMorgan Chase interview questions with answers (software engineer)
- JPMorgan coding round questions with solutions
- Juspay Coding Round Questions
- Juspay Interview Questions with Answers
- KPIT coding round questions
- KPIT interview questions and answers