Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

You are going to develop a small piece of code that accepts a comma-delimited list of tags (words/tokens - characters, numbers, some symbols like $£%& but not a comma) and must return an array of tags. The preceding and proceeding commas should be removed, white spaces preceding the first tag must be removed, white spaces succeeding the last tag must be removed, and contiguous series of words separated with spaces and ended with a comma should be treated as a single tag

Examples of the rules are as follows

  • "csharp" must return ["csharp"]

  • "csharp, python" must return ["csharp", "python"]

  • "java, C#, python" must return ["java", “C#”, "python"]

  • " csharp" must return ["csharp"]

  • ",csharp" must return ["csharp"]

  • "csharp," must return ["csharp"]

  • "C# byte code, python" must return ["C# byte code", "python"]

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.