Infosys SP / DSE Placement Simulation
System Engineer & Specialist Programmer debugging assessment
20-challenge advanced assessment for Infosys Specialist Programmer (SP) and Digital Specialist Engineer (DSE): 10 JavaScript & 10 Python challenges covering sorting, binary search, sliding window, set mutations, and non-trivial edge conditions.
BugHunt Max Placement Exam Simulation (Infosys)
Full campus hiring assessment with Bar Raiser AI viva cross-examination, priority queue, and verified certificate badge.
Your Progress
0 of 19 completed
Infosys Assessment Questions
Showing 19 debugging challenges
- Q1
Dashboard crashes for a user with no address
getUserCity(user) returns the user's city, or "Unknown" if the user has no address. Example: getUserCity({}) โ "Unknown".
javascripteasy - Q2
Member discount crashes with ReferenceError
finalPrice(price, isMember) gives members 10% off and returns the price to pay. Example: finalPrice(100, true) โ 90, finalPrice(100, false) โ 100.
javascriptmedium - Q3
Flattening stops after one level
flattenDeep(arr) removes all nesting, however deep. Example: flattenDeep([1, [2, [3, [4]]]]) โ [1, 2, 3, 4].
javascriptmedium - Q4
Grouping words keeps only one per group
groupByLength(words) groups words by their length. Example: groupByLength(["ab", "cd", "x"]) โ { 1: ["x"], 2: ["ab", "cd"] }.
javascriptmedium - Q5
Removing duplicates never finishes
dedupe(arr) returns the array without duplicates, keeping the first copy of each value. Example: dedupe([1, 2, 2, 3]) โ [1, 2, 3].
javascripthard - Q6
Search freezes when the value is missing
indexOfValue(sorted, target) returns the index of target in a sorted array, or -1 if it is not there. Example: indexOfValue([1, 3, 5, 7], 4) โ -1.
javascripthard - Q7
Two identical records counted as different
countUnique(records) counts records with different contents. Two records with the same fields count once. Example: countUnique([{ id: 1 }, { id: 1 }]) โ 1.
javascripthard - Q8
0.1 + 0.2 gives 0.30000000000000004
addPrices(a, b) adds two prices and returns a result correct to the cent. Example: addPrices(0.1, 0.2) โ 0.3.
javascriptmedium - Q9
Type checker says null is an object
describeType(value) names the type of a value. It returns "null" for null and "object" for real objects. Example: describeType(null) โ "null".
javascripthard - Q10
Setting retries to 0 turns them back on
retriesFor(settings) returns settings.retries if it is set, or 3 if it is missing. 0 means "don't retry". Example: retriesFor({ retries: 0 }) โ 0, retriesFor({}) โ 3.
javascriptmedium - Q11
Binary search can't find the last item
binary_search(nums, target) returns the index of target in a sorted list, or -1 if it is not there. Example: binary_search([1, 3, 5, 7, 9], 9) โ 4.
pythonhard - Q12
Best window of 2 misses the last pair
max_window_sum(nums, k) returns the biggest sum of k numbers in a row. Example: max_window_sum([1, 2, 3, 10], 2) โ 13 (3 + 10).
pythonhard - Q13
Counting pairs freezes when a pass finds none
count_pairs(nums, target) counts the pairs of numbers that add up to target. Example: count_pairs([1, 2, 3], 5) โ 1 (2 + 3).
pythonhard - Q14
Leave calculator counts one day short
leave_days(start_iso, end_iso) counts the days of leave, including the first and last day. Example: leave_days("2024-01-01", "2024-01-07") โ 7.
pythonmedium - Q15
Search gives up after checking one item
contains(items, target) returns True if target is anywhere in the list. Example: contains([4, 8, 15], 8) โ True.
pythoneasy - Q16
Settings lookup crashes on a missing key
get_setting(config, key) returns the value for key, or "default" if the key is not there. Example: get_setting({"theme": "dark"}, "font") โ "default".
pythoneasy - Q17
Sorted name list comes back as None
sorted_names(names) returns the names in A to Z order. Example: sorted_names(["b", "a"]) โ ["a", "b"].
pythoneasy - Q18
Adding a tag makes the whole list disappear
add_tag(tags, new_tag) adds a tag to the list and returns the list. Example: add_tag(["python"], "debugging") โ ["python", "debugging"].
pythoneasy - Q19
Shopping total crashes at the end of the list
cart_total(prices) adds up every price. Example: cart_total([10, 20, 30]) โ 60.
pythoneasy
More collections to explore
Your First 5 Bugs
Five beginner-friendly bugs with clear symptoms and satisfying fixes. The best place to start if you are new to debugging.
Python Gotchas
Mutable default arguments, list.sort() returning None, and mutating a list while iterating over it.
JavaScript Type Coercion Traps
Accidental string concatenation, array sort ordering numbers alphabetically, and zero being falsely treated as missing.
The Off-By-One Gauntlet
Fencepost errors, inclusive vs exclusive slice bounds, and loops that step one position too far.
Async Nightmares
The asynchronous bugs that silently swallow data: un-awaited promises, forEach loops with async callbacks, and race conditions.
AI Code Comprehension
Simulate modern Code Comprehension rounds: classic coding questions written by an AI that pass the obvious test, but break on subtle edge cases.
TCS NQT Placement Simulation
Simulate the actual TCS NQT hands-on coding & debugging assessment: 20 curated challenges (10 JavaScript + 10 Python) covering prime number boundaries, string parsing, Fibonacci series, Two Sum map lookups, and loop invariants.
Amazon SDE OA Simulation
20-challenge rigorous Amazon SDE-1 Online Assessment simulation: 10 JavaScript & 10 Python challenges covering sliding window algorithms, binary search boundaries, asynchronous race conditions, and shared reference mutations.