Skip to content

Enhancement for Problem 535. Encode and Decode TinyURL #7078

@vibecoder

Description

@vibecoder

Your LeetCode username

vibecoder

Category of the bug

  • Question
  • Solution
  • Language
  • Missing Test Cases

Description of the bug

The solution to the https://leetcode.com/problems/encode-and-decode-tinyurl/ that got accepted was a simple return of the function parameter.
This should not be allowed as part of learning exercise and the question should be modified to stop encouraging submissions like these.

Code you used for Submit/Run operation

  string encode(string longUrl) {
        return longUrl;
    }

    // Decodes a shortened URL to its original URL.
    string decode(string shortUrl) {
        return shortUrl;
    }

Language used for code

C++

Expected behavior

Screenshots

Additional context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions