sai srinivas jonnalagadda

Greenhorn
+ Follow
since Jul 27, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sai srinivas jonnalagadda

actually, I can use the logic of generating sequence numbers 0,1....
but the same logic needs to implemented at some other place.
if i run this logic there, i cannot retain the generated sequence, there is no guarantee that the input numbers will map to the same generated number unless the input number sequence is consistent.

my intention is for a given input number, the outcome should be same irrespective of wherever we run the logic and also irrespective of the sequence of input.

the reason for why i mentioned about comparison of numbers is because, once we get the logic, we can overcome the shortcomings.
12 years ago
the possible input values are definitely less that 2^31, that is for sure.
and it is not case that every number contains 0020XX000,.
minimum and maximum digits in the input number is 17. so the input is a 17 digit number.

if i get duplicate number(by making some comparisons like putting in the hash set something), i will run the algorithm until i get new number.
12 years ago
the input number contains maximum of 17 digits .
12 years ago
you are right..
as long as the input number is same.. that combination remains same.
that is that my problem. the resultant number can be again a big number.


12 years ago
no james.
because this logic is needed at many places where DB operations are not there.
I found one solution.
divide the input number by some big number (assumed to be maximum value of int) and then concat both quotient and reminder which is definitely be a unique number.
but the problem is that the new generated number itself is might be a big number larger that int.
so i stuck over here.
i want similar kind of algorthims
12 years ago

problem is i am doing some database operations with those numbers. the maximum limit for that column is 2power32 -1.. i cannot change the data type for that column
so, I must convert them uniquely into int sized values, so that i can insert them in tables.
I want a algorithm kind of thing which generates random unique number based on the digits of the input number.
12 years ago
that is right. but I need a good approach of generating unique numbers.
i don't want to increment values from 0 blindly.
12 years ago
Hi,
I am developing a application, which has some int manipulations.
Thing is i am getting input values as 31958379002001000, 31958379002001000, 31898379002001000, 31828379002002000, 31828379002002000 etc.
they are not fit in int. but i must use int only.

so, I want to generate a distinct unique number for each of the big input number shown above and display them in response in some how. and the resultant number should again be fit in int size.

I need it very urgent. please help me.

Thanks
12 years ago
Hi,
I am developing a application, which has some int manipulations.
Thing is i am getting input values as 31958379002001000, 31958379002001000, 31898379002001000, 31828379002002000, 31828379002002000 etc.
they are not fit in int. but i must use int only.

so, I want to generate a distinct unique number for each of the big input number shown above and display them in response in some how. and the resultant number should again be fit in int size.

I need it very urgent. please help me.

Thanks

12 years ago