我有像这样的字符串列表。字符串解析到数组的最佳算法
"Section 1/Part 1"
"Section 2/Part 1"
"Section 2/Part 2"
"Section 3/Part 1"
"Section 3/Part 2"
"Section 3/Part 3"
我要分析它的数组列表中的数组列表如下:
Section 1 -> Part 1
Section 2 -> Part 1
-> Part 2
Section 3 -> Part 1
-> Part 2
-> Part 3
一个简单的代码示例,请于理解算法
用'/'分割,然后根据第一项进行分类。你的编程语言是什么? – Kasramvd
我已经把它分开了。我想用它创建数组 –
你尝试了什么? – Winter