I want to calculate most frequent value from this set. So I've found this question which says it's mode.

I've problem with spliting this set into clases.

I want to put in my algorithm some delta value and assign to one class values which fullfills x - delta < mean_class_value < x + delta. Of course I see the problem that I don't have a class and to create it I need it's mean value. Also solution which will make the same reasonable result will be ok.

Any solution in pseudocode will be great help.

My current solution its pseudocode mixed with c++ but hope understandable:

First of all you have discrete set of values . Depending on the purpose of your data analysis you can evaluate different statistics ( functions of the data). If you want to divide your data into classes you should calculate histogram. Assume $x_{(1)}=min_{i} x_i$ ( the smallest element) and $x_{(n)}=max_i x_i$ ( the largest element ), assume also that you want to divide your data set into $k$ disjoint classes. Proceed as follows: let $\delta=\frac{x_{(n)}-x_{(1)}}{k}$, $\forall i=0,...,k-1$ calculate amount of the elements in the interval $[x_{(1)}+i*\delta,x_{(1)} + (i+1)*\delta]$. This will be representation of your data as a histogram, nothing more. As for the most frequent value, I doubt that mode will be of any value ( if you have indeed continuous distribution it won't even have a meaning) instead you should calculate mean.