TryBugHunt
All collections
๐Ÿ’ผCampus Placement ยท Max ~60 mins

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.

JavaScript & PythonMedium19 ChallengesBugHunt Max Exclusive
๐Ÿ”’

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

Start Track

Infosys Assessment Questions

Showing 19 debugging challenges

  1. 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".

    easy
  2. 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.

    medium
  3. Q3

    Flattening stops after one level

    flattenDeep(arr) removes all nesting, however deep. Example: flattenDeep([1, [2, [3, [4]]]]) โ†’ [1, 2, 3, 4].

    medium
  4. 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"] }.

    medium
  5. 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].

    hard
  6. 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.

    hard
  7. 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.

    hard
  8. 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.

    medium
  9. 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".

    hard
  10. 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.

    medium
  11. 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.

    hard
  12. 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).

    hard
  13. 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).

    hard
  14. 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.

    medium
  15. 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.

    easy
  16. 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".

    easy
  17. 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"].

    easy
  18. 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"].

    easy
  19. Q19

    Shopping total crashes at the end of the list

    cart_total(prices) adds up every price. Example: cart_total([10, 20, 30]) โ†’ 60.

    easy

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.

View track โ†’
๐Ÿ

Python Gotchas

Mutable default arguments, list.sort() returning None, and mutating a list while iterating over it.

View track โ†’
โšก

JavaScript Type Coercion Traps

Accidental string concatenation, array sort ordering numbers alphabetically, and zero being falsely treated as missing.

View track โ†’
๐Ÿ“

The Off-By-One Gauntlet

Fencepost errors, inclusive vs exclusive slice bounds, and loops that step one position too far.

View track โ†’
โณ

Async Nightmares

The asynchronous bugs that silently swallow data: un-awaited promises, forEach loops with async callbacks, and race conditions.

View track โ†’
๐Ÿค–

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.

View track โ†’
๐Ÿข

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.

View track โ†’
๐Ÿ“ฆ

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.

View track โ†’