Questions tagged as 'algoritmo'

14
answers

Determine if all digits are equal

Parameterized by a numeric value. For example, 888 or 546. And I have a function that returns a boolean true value if all numbers are equal or false if they are different. How do I proceed with the algorithm?     
asked by 23.10.2015 / 00:45
6
answers

Algorithm against Brute-force

I've been thinking of an algorithm against Brute-force attacks that, as we saw in iCloud case , it can generate large headaches if treated with indifference. Initially I thought of this flow: Login Attempt:    [define uma sessio...
asked by 15.09.2014 / 15:00
5
answers

Is there any algorithm to check the validity of a RG number in Brazil using digits checkers?

Is there any algorithm to check the validity of a RG number in Brazil using digits checkers, as with the CPF? If so, what is this algorithm like?     
asked by 11.12.2013 / 18:27
3
answers

Algorithm for faster route calculation between two points in parallel Cartesian layers (3D)

I'm working on a solution that involves determining the least effort route between two points in a building. (Imagine students on their first day of university, who need to know where they are and how to get to a given classroom in a building, o...
asked by 12.09.2014 / 22:41
7
answers

How to differentiate phone types

I have the following problem: the client will send me a phone number and I need to differentiate if it is fixed or cell phone, does anyone know some rules that distinguish the two groups well?     
asked by 29.04.2014 / 22:01
4
answers

Check Old Game winner

The algorithm teacher asked us to write a code to play a simple old game in Java. And I already have everything ready, but I'm not too happy with the solution I've got to validate who won the game. I've done a series of if and elseifs to chec...
asked by 08.10.2014 / 13:48
5
answers

How to check for similarity between strings?

It is very common to compare strings , which is usually done by comparing equality. However, today I have come up with the need to compare the similarity between two strings , so that I can compare how similar they are. For exam...
asked by 25.03.2014 / 01:28
1
answer

Algorithm for name generation

I researched a lot but did not find an algorithm that does something like banks do. For example, when you register for the first time in a 24-hour box, the machine generates a password. In general, 3 or 4 letter pairs are entered as a password....
asked by 11.09.2014 / 11:56
4
answers

How to distribute words in a fixed size area?

I have a list of words and I need to distribute them in an area of fixed dimensions so that it looks like they have been arranged randomly in this space. But I need to make sure the words do not encash, and there are not any big "holes" in the a...
asked by 26.02.2014 / 15:39
3
answers

What is the usefulness and importance of "do ... while"?

The while command is a repeating structure with a condition at the beginning of the declaration. Example:    while (condition) {         sentences to run   } Already do... while has verification at the end, ie, the repea...
asked by 06.08.2015 / 15:22