How to group consecutive integers in an array?

前端 未结 0 1774
梦毁少年i
梦毁少年i 2021-01-31 14:26

Such as int int* lis[9] = {1,2,3,10,20,21};, how to split it into {{1,2,3},{10},{20,21}} and return a map to map the int to t

相关标签:
回答
  • 消灭零回复
提交回复
热议问题