1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/TinyURL 的加密与解密 [encode-and-decode-tinyurl].html
2022-03-29 12:43:11 +08:00

4 lines
548 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>TinyURL是一种URL简化服务 比如当你输入一个URL&nbsp;<code>https://leetcode.com/problems/design-tinyurl</code>&nbsp;它将返回一个简化的URL&nbsp;<code>http://tinyurl.com/4e9iAk</code>.</p>
<p>要求:设计一个 TinyURL 的加密&nbsp;<code>encode</code>&nbsp;和解密&nbsp;<code>decode</code>&nbsp;的方法。你的加密和解密算法如何设计和运作是没有限制的你只需要保证一个URL可以被加密成一个TinyURL并且这个TinyURL可以用解密方法恢复成原本的URL。</p>