ayah abuzaid
New Member
I have a staff numbers arranged sequentially
like
1
100
101
102
103
.
.
.
2
200
201
.
.
and i make a binary search on them
but i faced a problem that
in sequential numbers consider 2>103
but when comparing between these two number in binary serach consider 103>2
because the number of digits in 103 bigger than the number of digits in 2
is there a way to compare between sequential number without facing this problem
please help
like
1
100
101
102
103
.
.
.
2
200
201
.
.
and i make a binary search on them
but i faced a problem that
in sequential numbers consider 2>103
but when comparing between these two number in binary serach consider 103>2
because the number of digits in 103 bigger than the number of digits in 2
is there a way to compare between sequential number without facing this problem
please help