Closed traumfeuchte closed 3 weeks ago
LeetCode Support commented: Hi mTL03VxOp1,
Thank you for reaching out and providing detailed information on the issue you're experiencing. Based on the information you've submitted, it appears the issue is related to how the test cases are executed and the memory is managed in your code. C language requires careful handling of memory allocation and initialization, especially between consecutive test runs.
It is often helpful to ensure that all pointers and arrays are properly initialized or reallocated between separate test cases. Additionally, you might want to explicitly handle cases where the input is an empty array to prevent unexpected behavior.
If you are encountering persistent issues, please try verifying your code’s logic and memory allocation routines. Alternatively, consulting forums or resources on C language memory management could provide more insight into resolving this issue.
Feel free to reach out if you have further questions or encounter any other issues. We're here to help!
LeetCode Support Team
LeetCode Username
mTL03VxOp1
Problem Number, Title, and Link
228, summary ranges https://leetcode.com/problems/summary-ranges/description/?source=submission-noac
Bug Category
Incorrect test case (Output of test case is incorrect as per the problem statement)
Bug Description
test case passes and fails, just depending on the order of test cases:
when test is first it passes when test is not first test case: it may fail
output displayed depends on the previous test case
Language Used for Code
C
Code used for Submit/Run operation
Expected behavior
expected: test case of input empty array passes when its the first/only test case but fails otherwise
Screenshots
Additional context
No response