Questions tagged as 'algoritmo'


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

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

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

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

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

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

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

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

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

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