Prepverse In Association with
Coding Interview Report
Interview Overview Overall Score
Coding Assessment
Started: April 20th, 2026
Ended: April 20th, 2026
Duration: 98 minutes
99%
3/3 3/3
Qns Attempted Qns Passed
Overall Status: PASSED
AI Interview Analysis
This candidate demonstrates a strong ability to solve coding problems effectively using Python,
completing all three interview questions with correct and efficient solutions. Their code quality,
while solid, can benefit from enhanced documentation and attention to edge cases. They are
well-suited for advanced roles involving Python development due to the demonstrated profi-
ciency.
Strengths Areas for Improvement
• Efficient use of two-pointer technique in the • Improve solution documentation with clear and
'Move Zeroes' problem. comprehensive comments.
• Appropriate stack operations in solving 'Valid • Develop strategies to ensure handling of edge
Parentheses' problem. cases and invalid inputs.
• Effective manipulation of strings and lists in the • Optimize specific operations for minimal re-
'Reverse String II' problem. source usage where possible.
Proficient Topics
Array Manipulation String Operations Stack-based Algorithms
Code Quality Rating:9/10
Coding Problems
1. Move Zeroes EASY PASSED 5/5 Passed
<p>You are given an integer array <code>nums</code>.</p><p>Your task is
to <strong>move all the </strong><code>0</code><strong>s to the end</strong>
of the array while keeping the <strong>relative order of non-zero ele-
ments the same</strong>.</p><h3><strong>Important Rules:</strong></h3><ol><li><p>You
must do this <strong>in-place</strong> (no extra array allowed).</p></li><li><p>Try
to <strong>minimize the number of operations</strong>.</p></li></ol><h3><strong>Ex-
ample 1</strong></h3><p><strong>Input</strong></p><pre><code class="language-text">nums
= [0,1,0,3,12]</code></pre><p><strong>Output</strong></p><pre><code class="lan-
guage-text">[1,3,12,0,0]</code></pre><h3><strong>Example 2</strong></h3><p><strong>In-
put</strong></p><pre><code class="language-text">nums = [0]</code></pre><p><strong>Out-
put</strong></p><pre><code class="language-text">[0]</code></pre><h3><strong>Explanation
(Simple):</strong></h3><ul><li><p> Take all non-zero numbers and shift them forward.
</p></li><li><p> Fill remaining positions with <code>0</code>. </p></li></ul><h3><strong>Con-
straints:</strong></h3><ul><li><p><code>1 d [Link] d 10t</code> </p></li><li><p><code>-2³¹ d
nums[i] d 2³¹ - 1</code> </p></li></ul><p></p>
Array Two Pointers In-Place Operations
Time Complexity Total Test Cases Space Complexity
O(N) 5 O(1)
Test Cases Passed Total Memory Used Total Execution Time
5 4552 0.17
Test Case Results
Status Input Output Expected Time Memory
passed [0, 1, 0, 3, 12] [1,3,12,0,0] [1,3,12,0,0] 0.036 4364
passed [4, 2, 4, 0, 0, 3, 0, 5, 1, [4,2,4,3,5,1,0,0,0,0] [4,2,4,3,5,1,0,0,0,0] 0.033 4552
0]
passed [0, 0, 1] [1,0,0] [1,0,0] 0.034 4508
passed [0] [0] [0] 0.034 4416
passed [1, 0, 2, 0, 3] [1,2,3,0,0] [1,2,3,0,0] 0.033 4332
AI Feedback for this Question
The submitted code successfully implements the functionality to move all zeroes in the array
to the end while maintaining the relative order of non-zero elements. It efficiently uses a
two-pointer approach to perform the operation in-place.
### Code Strengths
- The code correctly implements the two-pointer technique to rearrange the elements in-place.
- It adheres to the constraints of minimizing operations and avoiding extra space usage.
- The solution passes all provided test cases, demonstrating its correctness.
### Areas for Improvement
- Consider adding comments to explain the logic behind the two-pointer approach for better
readability.
- Ensure edge cases, such as arrays with all zeroes or no zeroes, are explicitly tested and
documented.
- Optimize the code further by avoiding unnecessary swaps when `i` equals `j`.
Submitted Code (Python (3.8.1))
from typing import List
import sys
import json
def moveZeroes(nums: List[int]) -> None:
# --- Your actual solution code will be inserted here ---
j=0
for i in range(len(nums)):
if nums[i] !=0:
nums[j],nums[i] = nums[i],nums[j]
j+=1
2. Valid Parentheses HARD PASSED 5/5 Passed
<p>You are given a string <code>s</code> that contains only these characters: <code>(</code>,
<code>)</code>, <code>{</code>, <code>}</code>, <code>[</code>, <code>]</code>.</p><p>Your
task is to check whether the string is <strong>valid</strong>.</p><p>A string is
<strong>valid</strong> if:</p><ol><li><p>Every opening bracket has a <strong>matching closing
bracket of the same type</strong>.</p></li><li><p>Brackets are closed in the <strong>correct or-
der</strong>.</p></li><li><p>A closing bracket <strong>must not appear before its correspond-
ing opening bracket</strong>.</p></li></ol><h3><strong>Example 1</strong></h3><p><strong>In-
put</strong></p><pre><code class="language-text">s = "()"</code></pre><p><strong>Out-
put</strong></p><pre><code class="language-text">true</code></pre><h3><strong>Con-
straints</strong></h3><ul><li><p><code>1 d [Link] d 10t</code></p></li><li><p><code>s</code>
contains only: <code>(</code>, <code>)</code>, <code>{</code>, <code>}</code>,
<code>[</code>, <code>]</code></p></li></ul><p></p>
Array String
Time Complexity Total Test Cases Space Complexity
O(N) 5 O(N)
Test Cases Passed Total Memory Used Total Execution Time
5 3368 0.084
Test Case Results
Status Input Output Expected Time Memory
passed "()" true true 0.019 3204
passed "()[]{}" true true 0.019 3152
passed "{[]}" true true 0.018 3368
passed "(]" false false 0.015 3224
passed "(((" false false 0.013 3332
AI Feedback for this Question
The submitted code correctly implements a solution for the Valid Parentheses problem, passing
all provided test cases efficiently. ### Code Strengths - The code uses a stack-based approach,
which is optimal for this type of problem. - The mapping dictionary is utilized effectively
to match closing brackets with their corresponding opening brackets. - The implementation
is clean and adheres to Pythonic conventions. ### Areas for Improvement - Consider adding
comments to explain the logic behind the stack operations for better readability. - Handle edge
cases explicitly, such as empty strings or strings with invalid characters, even though the
constraints ensure valid input. - Optimize memory usage by ensuring the stack is used minimally
for very large inputs.
Submitted Code (Python (3.8.1))
import sys
def isValid(s: str) -> bool:
# --- Your actual solution code will be inserted here ---
stack=[]
mapping={')':'(','}':'{',']':'['}
for char in s:
if char in mapping:
if not stack or stack[-1] !=mapping[char]:
return False
[Link]()
elif char in [Link]():
[Link](char)
else:
continue
return len(stack) == 0
3. Reverse String II EASY PASSED 4/4 Passed
<p>Given a string <code>s</code> and an integer <code>k</code>, reverse the first <code>k</code>
characters for every <code>2k</code> characters counting from the start of the string.</p><p>If
there are fewer than <code>k</code> characters left, reverse all of them. If there are less
than <code>2k</code> but greater than or equal to <code>k</code> characters, then reverse
the first <code>k</code> characters and leave the other as original.</p><p><strong>Example
1:</strong></p><pre><code class="language-text">Input: s = "abcdefg", k = 2
Output: "bacdfeg"
</code></pre><p><strong>Example 2:</strong></p><pre><code class="language-text">Input: s =
"abcd", k = 2
Output: "bacd"
</code></pre><p><strong>Constraints:</strong></p><ul><li><p><code>1 <= [Link] <=
104</code></p></li><li><p><code>s</code> consists of only lowercase English let-
ters.</p></li><li><p><code>1 <= k <= 104</code></p></li></ul><p></p>
Two Pointers String
Time Complexity Total Test Cases Space Complexity
O(N) 4 O(N)
Test Cases Passed Total Memory Used Total Execution Time
4 3292 0.081
Test Case Results
Status Input Output Expected Time Memory
passed abcdefg,2 bacdfeg bacdfeg 0.02 3268
passed abcd,2 bacd bacd 0.02 3256
passed a,2 a a 0.021 3292
passed abcdef,8 fedcba fedcba 0.02 3224
AI Feedback for this Question
The submitted code correctly implements the logic to reverse the first `k` characters for every
`2k` characters in the string, as described in the problem statement. It passes all provided
test cases efficiently and demonstrates a clear understanding of string manipulation.
### Code Strengths
- The code is concise and utilizes Python's slicing and `reversed()` function effectively.
- It adheres to the problem constraints and handles edge cases, such as strings shorter than
`k` or `2k`.
- The implementation is efficient and readable, with a clear loop structure.
### Areas for Improvement
- Consider adding comments or docstrings to explain the logic behind key operations, such as
the slicing and reversal.
- Ensure the code is robust against unexpected inputs, although the constraints guarantee valid
inputs for this problem.
- Optimize for readability by breaking down complex expressions into intermediate variables if
necessary.
Submitted Code (Python (3.8.1))
class Solution:
def reverseStr(self, s: str, k: int) -> str:
"""
:param s: String to be processed
:param k: Reversal interval
:return: Modified string
"""
# Write your logic here
s=list(s)
for i in range(0,len(s),2*k):
s[i:i+k]=reversed(s[i:i+k])
return "".join(s)