These projects aim to practice algorithms and calculate their time and space complexity. You are required to solve these three projects Tokenizer YAML file, Parsing YAML file, and Search for a word in YAML file.
The purpose of the project is to learn how to implement the tokenizer and calculate its time and space complexity
Tokenizer takes a string value or file and categorizes it based on the value of its id, string, or number. Finally, it puts the tokens' value into an array list and tokens' type into an array list.
You have a yaml_cotent which is:
name: "ProjectOne"
You're required to read each letter in the file yaml_cotent and identify if the content is id, string, number, whitespace, or colon.
The output should be:
['name', ':', ' ', 'ProjectOne']
['id', 'colon', 'whitespace', 'string']
- The code should run successfully.
- The output should match the expected output.
You're required to print the tokenizer content, but the output should be as the following:
key:name
value:ProjectOne
- The code should run successfully.
- The output should match the expected output.
You're required to build a search function that takes one parameter a string type.
Finally, write the time complexity and space complexity of the function as a comment above the function.
- The code should run successfully.
- The time complexity and space complexity should be correct.