title: How to segment elements from an array of values (C/C++)
body: <p>Good morning!
  Given the following input example from a text file: <a href="https://i.stack.imgur.com/VnMlV.png" rel="nofollow noreferrer">https://i.stack.imgur.com/VnMlV.png</a></p>
  <p>I have been handed the following task:</p>
  <ul>
  <li>Insert the values into an array</li>
  <li>Gather duplicate values into different TYPES of segments and count the number of values in each segment, as shown in the picture: <a href="https://i.stack.imgur.com/qepoa.png" rel="nofollow noreferrer">https://i.stack.imgur.com/qepoa.png</a></li>
  <li>Form a 2-line Matrix where each column represents a different segment, the first line represents the type of segment for each individual segment, and the second line represents the number of values in that specific segment, as shown in the following image: <a href="https://i.stack.imgur.com/ncNnC.png" rel="nofollow noreferrer">https://i.stack.imgur.com/ncNnC.png</a></li>
  </ul>
  <p>I have no problem with the first and last parts of the task, however I do not know how to separate the values into different segments nor classify them. Sorry for the complicated explanation, but thanks in advance for any help!</p>