0

Chinese word should be sorted according to the number of strokes present in that word and the english word should be sorted alphabetically . Please help me find the number of strokes in Chinese word.

brandonscript
  • 68,675
  • 32
  • 163
  • 220
Samip Shah
  • 854
  • 7
  • 11
  • What sorting are you using? Also can you put your sample strings and expected output? Since Most of us don't understand Chinese so it would be better if your paste your actual strings rather than images – Inder Kumar Rathore Mar 03 '17 at 05:43
  • Can you hard-code a dictionary of characters and stroke counts? You can then use a predicate filter on the data to prioritize the order based a hybrid of alphabetical and stroke count. – brandonscript Mar 03 '17 at 05:44
  • You do not have to count the strokes yourself. Simply use the sort capabilities of Cocoa. – Amin Negm-Awad Mar 03 '17 at 05:45
  • OH, yeah it's built into iOS. See http://stackoverflow.com/a/29873200/1214800 – brandonscript Mar 03 '17 at 05:47

0 Answers0