-
Notifications
You must be signed in to change notification settings - Fork 0
LeetCode 271: Encode and Decode Strings #61
Copy link
Copy link
Open
Labels
blind-75Blind 75 - Blind-75 problemsBlind 75 - Blind-75 problemsstringBlind 75 - String problemsBlind 75 - String problems
Description
LeetCode 271: Encode and Decode Strings
Category: String
Difficulty: See LeetCode
Solution File: src/string/encode_and_decode_strings.py
Test File: tests/test_encode_and_decode_strings.py
Problem Description
Design an algorithm to encode a list of strings to a string. The encoded string is then sent
over the network and is decoded back to the original list of strings.
Implement the encode and decode methods.
Example 1:
Input: dummy_input = ["Hello","World"]
Output: ["Hello","World"]
Example 2:
Input: dummy_input = [""]
Output: [""]
Constraints:
- 1 <= strs.length <= 200
- 0 <= strs[i].length <= 200
- strs[i] contains any possible characters out of 256 valid ASCII characters.
Tasks
- Implement the solution in
src/string/encode_and_decode_strings.py - Ensure all test cases pass
- Analyze time complexity
- Analyze space complexity
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
blind-75Blind 75 - Blind-75 problemsBlind 75 - Blind-75 problemsstringBlind 75 - String problemsBlind 75 - String problems