Prepverse In Association with
Coding Interview Report
Interview Overview Overall Score
Coding Round
Started: April 23rd, 2026
Ended: April 23rd, 2026
Duration: 54 minutes
23%
5/5 1/5
Qns Attempted Qns Passed
Overall Status: FAILED
AI Interview Analysis
This candidate shows potential but currently exhibits significant gaps in fundamental program-
ming skills, as demonstrated by the inability to successfully solve the majority of selected prob-
lems. The lone successful problem indicates basic knowledge, but the numerous failures and
structural errors suggest the need for improvement in core competencies before considering
them qualified for this role. Moreover, issues like syntax errors and incomplete implementation
need to be addressed through focused practice.
Strengths Areas for Improvement
• Completed all questions without skipping. • Ensure full implementation of solutions to return
• Attempted logical approaches for solving prob- correct results.
lems. • Enhance debugging skills to identify and fix er-
• Applied efficient concepts like XOR and dictio- rors in code.
nary usage. • Practice basic programming problems to solidify
understanding of constructs and operations.
Proficient Topics
Linked List Manipulations
Code Quality Rating:4/10
Coding Problems
1. Find Missing Number EASY FAILED 0/5 Passed
You are given an array containing n distinct numbers taken from the range 0 to n.
This means one number in the range is missing from the array.
Your task is to return the missing number.
Constraints:
The array contains n numbers and all are unique.
The numbers are in the range [0, n], so exactly one number is missing.
1 dn d 10t
Array String Bit Manipulation MATH
Time Complexity Total Test Cases Space Complexity
O(N) 5 O(1)
Test Cases Passed Total Memory Used Total Execution Time
0 4764 0.161
Test Case Results
Status Input Output Expected Time Memory
failed [3, 0, 1] None 2 0.033 4484
failed [0, 1] None 2 0.034 4512
failed [9,6,4,2,3,5,7,0,1] None 8 0.032 4384
failed [0] None 1 0.031 4556
failed [1, 2] None 0 0.031 4764
AI Feedback for this Question
The submission includes an attempt to solve the problem using XOR operations, which is a valid
approach. However, the implementation is incomplete and does not return the result correctly.
### Code Strengths
- The approach of using XOR to find the missing number is efficient and avoids extra space
usage.
- The code correctly iterates over the range of numbers and the input array to compute the XOR.
### Areas for Improvement
- The function `missingNumber` is defined twice within the same scope, which is unnecessary
and causes confusion.
- The `pass` statement at the end of the function prevents the actual implementation from
executing, leading to incorrect results.
- Ensure the function returns the computed result instead of `None`.
Submitted Code (Python (3.8.1))
from typing import List
import sys
import json
def missingNumber(nums: List[int]) -> int:
# --- Your actual solution code will be inserted here -
def missingNumber(nums):
n = len(nums)
xor_all = 0
for i in range (n+1):
xor_all ^= i
for num in nums:
xor_all ^= num
return xor_all
pass
2. Reverse an Array EASY FAILED 0/3 Passed
DescriptionWrite a function that takes an integer array nums as input and reverses the order of its
elements [Link] function should not return a new array; it should modify the original input
[Link] solution should run in $O(n)$ time [Link] space complexity should be $O(1)$
(constant extra space).
Array String
Time Complexity Total Test Cases Space Complexity
Not applicable 3 Not applicable
Test Cases Passed Total Memory Used Total Execution Time
0 4424 0.074
Test Case Results
Status Input Output Expected Time Memory
failed [1] [1] 0.025 4424
failed [10,20,30,40,50] [50,40,30,20,10] 0.023 4324
failed [1,2,3,4,5,6] [6,5,4,3,2,1] 0.026 4288
AI Feedback for this Question
The submission is non-functional and contains placeholder code that does not implement the
required functionality.### Code Strengths
- No significant strengths identified, as the current submission is incomplete or non-func-
tional.### Areas for Improvement
- Implement the logic to reverse the array elements in-place using the two-pointer approach as
described.
- Correct the syntax errors in the code, such as the incorrect use of the `right` pointer.
- Ensure the function modifies the input array directly and does not return any value.
Submitted Code (Python (3.8.1))
from typing import List, Optional
def reverseArray(nums: List[int]) -> List[int]:
# Your code here
def reverseArray(nums):
left , right =0,len (nums)
while left < right:
nums[left], nums[right]=nums[right],nums[left]
left += 1
right -= 1
pass
3. Merge Two Sorted Lists EASY PASSED 5/5 Passed
You are given the heads of two sorted singly linked lists, list1 and list2.
Merge the two lists into one sorted linked list, and return the head of the merged list.
You must do this by splicing together the nodes of the original lists — do not create new nodes.
Constraints:
The number of nodes in both lists is in the range [0, 50].
-100 [Link] d 100
Both list1 and list2 are sorted in non-decreasing order.
Recursion Two Pointers LINKED_LIST SORTING
Time Complexity Total Test Cases Space Complexity
O(N + M) 5 O(1)
Test Cases Passed Total Memory Used Total Execution Time
5 4620 0.177
Test Case Results
Status Input Output Expected Time Memory
passed [1,2,3],[] [1,2,3] [1,2,3] 0.036 4608
passed [],[0] [0] [0] 0.036 4452
passed [5,6,7],[1,2,3] [1,2,3,5,6,7] [1,2,3,5,6,7] 0.038 4524
passed [1,2,4],[1,3,4] [1,1,2,3,4,4] [1,1,2,3,4,4] 0.036 4620
passed [],[] [] [] 0.031 4440
AI Feedback for this Question
The submitted code demonstrates a correct approach to merging two sorted linked lists, with
minor syntax issues that need addressing for proper functionality.
### Code Strengths
- The logic for comparing node values and appending the smaller node to the result list is
correctly implemented.
- The code handles edge cases where one or both input lists are empty.
- The solution uses an iterative approach, which is efficient and avoids potential recursion
depth issues.
### Areas for Improvement
- There is a syntax error in the line `head =list1list1= [Link]`, which should be corrected
to properly assign the head of the merged list.
- The placeholder return statement `return None` at the end of the function is unnecessary and
should be removed.
- Adding comments to explain the logic and steps would improve code readability and
maintainability.
Submitted Code (Python (3.8.1))
import sys
import json
from typing import List, Optional
# Definition for singly-linked list.
class ListNode:
def __init__(self, val=0, next=None):
[Link] = val
[Link] = next
# Function to merge two sorted lists
def mergeTwoLists(list1: Optional[ListNode], list2: Optional[ListNode]) -> Optional[ListNode]:
if not list1:
return list2
if not list2:
return list1
if [Link] < [Link]:
head =list1list1= [Link]
else:
head=list2
list2=[Link]
tail = head
while list1 and list2:
if [Link]<[Link]:
[Link] = list1
list1 = [Link]
else:
[Link]= list2
list2=[Link]
tail = [Link]
if list1 :
[Link] = list1
else:
[Link] = list2
return head
# --- Your actual solution code will be inserted here ---
return None # Placeholder return
4. Nearest Duplicate Distance EASY FAILED 0/5 Passed
<p>You are given an integer array A. For every element, find the distance to its nearest identical
element (either left or right). If no duplicate exists for that element, return -1 for that position. Return
the result array. </p><p>This simulates finding the nearest repeated event in logs or user actions.
</p><h2>Constraints </h2><ul><li><p>1 d N d 100000 </p></li><li><p> 1 d A[i] d 100000 </p></li></ul><p>
</p><h2>Test Case 1 </h2><h3> Input: </h3><p> 1 2 3 1 4 2 </p><h3> Output: </h3><p> 3 3 -1 3 -1
3 </p><h2>Test Case 2 </h2><h3> Input: </h3><p> 5 5 5 5 </p><h3> Output: </h3><p> 1 1 1 1 </p>
Array String Hashing HashMap Two Pass Distance Calculation
Time Complexity Total Test Cases Space Complexity
Not applicable 5 Not applicable
Test Cases Passed Total Memory Used Total Execution Time
0 3272 0.102
Test Case Results
Status Input Output Expected Time Memory
failed [5, 5, 5, 5] [1, 1, 1, 1] 0.02 3236
failed [1, 2, 3, 4] [-1, -1, -1, -1] 0.021 3248
failed [3, 4, 3, 4, 3, 4] [2, 2, 2, 2, 2, 2] 0.02 3184
failed [1, 2, 3, 1, 4, 2] [3, 4, -1, 3, -1, 4] 0.02 3272
failed [1, 1, 2, 3, 4, 1] [1, 1, -1, -1, -1, 4] 0.021 3196
AI Feedback for this Question
The submitted code attempts to solve the problem of finding the nearest duplicate distances in
an array but contains several issues preventing its functionality.### Code Strengths- The use of
a dictionary to store indices of array elements is a good approach for tracking occurrences.-
The initialization of the result array with default values demonstrates consideration for
edge cases.- The logic for calculating distances between duplicate indices is partially
implemented.### Areas for Improvement- The code contains syntax errors, such as incorrect
indentation and undeclared variables (e.g., `A` is not defined).- The logic for updating the
result array is incomplete and does not handle all cases correctly.- The return statement is
misplaced and causes runtime errors; it should return the `result` array after processing all
elements.
Submitted Code (Python (3.8.1))
from typing import List
import sys
import re
from collections import defaultdict
class Solution:
def nearestDuplicateDistance(self, arr: List[int]) -> List[int]:
index_map = defaultdict(list)
for i ,val in enumerate (A):
index_map[val].append(i)
n = len (A)
result = [-1]*n
for indices in index_map.values():
if len(indices)==1:
continue
for i in range (len(indices)):
curr = indices[i]
left_dist = float('inf')
right_dist = float('inf')
if i>0:
left_dist = curr - indices[i+1]
if i < len(indices)-1:
right_dist= indices[i+1]-curr
result[curr] = min (left_dist, right_dist)
return result
# Write your logic here:
# 1. Initialize result array with float('inf')
# 2. Forward pass: Track last seen index of each element in a dict
# 3. Backward pass: Track next seen index of each element in a dict
# 4. Final pass: Convert any remaining 'inf' to -1
return arr
5. Reverse Linked List EASY FAILED 0/3 Passed
Given the head of a singly linked list, reverse the list and return the new head.
You must do this iteratively or recursively.
Constraints:
The number of nodes in the list is in the range [0, 5000]
-5000 [Link] d 5000
Recursion Two Pointers Linked List
Time Complexity Total Test Cases Space Complexity
O(N) 3 O(1)
Test Cases Passed Total Memory Used Total Execution Time
0 3468 0.048
Test Case Results
Status Input Output Expected Time Memory
failed [1, 2, 3, 4, 5] [5,4,3,2,1] 0.02 3468
failed [1, 2] [2,1] 0.014 3468
failed [3, 4, 5, 6] [6,5,4,3] 0.014 3312
AI Feedback for this Question
The submission attempts to solve the problem of reversing a singly linked list iteratively but
contains syntax errors that prevent execution.
### Code Strengths
- The iterative approach to reverse the linked list is logically correct and follows standard
practices.
- The use of pointers `prev` and `curr` is appropriate for this task.
### Areas for Improvement
- The constructor method of the `ListNode` class is incorrectly named `_init_` instead of
`__init__`. Additionally, `none` should be replaced with `None` to adhere to Python syntax.
- The `reverseList` method is not defined within a class context, and its indentation level is
incorrect. It should be properly nested within a class.
Submitted Code (Python (3.8.1))
class ListNode:
def _init_(self, val=0,next=none):
[Link] = val
[Link] = next
def reverseList(head):
prev = none
curr = head
while curr:
next_node = [Link]
[Link]=prev
prev= curr
curr= next_node
return prev