LeetCode-Feedback / LeetCode-Feedback

664 stars 318 forks source link

Missing Test Case - 2623. Memoize #19527

Closed kogrms closed 8 months ago

kogrms commented 8 months ago

LeetCode Username

kogrms

Problem number, title, and link

  1. Memoize https://leetcode.com/problems/memoize/

    Language used for code

    Code used for Submit/Run operation

    function memoize(fn) {
      let memoizedSumArgs
      let memoizedSum
      return function(...args) {
        if (args.length === 2) {
          if (!memoizedSumArgs || memoizedSumArgs.toString() !== args.toString()) {
            memoizedSum = fn(...args)
            memoizedSumArgs = args
            return memoizedSum
          } else {
            return memoizedSum
          }
        }
      }
    }

    Expected behavior

    The solution above should not go through the first test case

    Screenshots

    image

    Additional context

LC-Pam commented 8 months ago

Dear user,

Thank you for submitting your code to our platform. After a thorough evaluation, we regret to inform you that your code did not produce the expected results. Our code judge is functioning correctly, and we have verified the correctness of our evaluation process.

We kindly suggest that you review your code carefully and ensure it adheres to the problem requirements and constraints. It may be beneficial to double-check your logic, algorithm implementation, and any potential errors or corner cases that could affect the code's performance.

Additionally, we encourage you to explore our discussion board, where you can seek assistance from the community. Many experienced users and experts are available to help troubleshoot issues, provide insights, and offer guidance on improving your code.

We believe that by reviewing your code and actively engaging with the community, you will have a better chance of identifying and resolving the discrepancies. Remember, learning from such experiences and iterating on your code is an essential part of the programming journey.

We appreciate your understanding and encourage you to continue learning and improving your coding skills.

Should you have any further questions or need additional support, please don't hesitate to reach out to us.

Best regards,

The LeetCode Team