Questions tagged as 'algoritmo'

2
answers

Divide a String dynamically based on screen size

I'm working on an android app and at some point I get a String from a web-service that is pretty big, and the client wants that String (which will be shown in an EditText ) is divided into multiple parts, forming a pagination type (I thought...
asked by 18.05.2015 / 20:43
3
answers

Sort a multidimensional array with numeric values

Let's suppose the following situation in which I have array composed of several array with numerical values: $array = array( array(22, 25, 28), array(22), array(22, 23) ) I would like to leave this array ord...
asked by 31.01.2014 / 17:05
2
answers

External and internal memory ordering algorithms

I was researching the difference between external and internal memory sorting algorithms and found the following answer in    "In cases where we have to sort more data than can fit into the   main memory, we need an external classificatio...
asked by 18.11.2016 / 12:34
4
answers

How to extract digits from a string in Python and add them together?

I need to decompose a string into Python, separating letter and numbers, and perform the sum of these numbers. For example: string ="96h11k" From this string I need to extract the numbers 9, 6, 1, 1 and add them: 9 + 6 + 1 + 1 = 17. Act...
asked by 28.11.2014 / 18:19
1
answer

How does the secret of Bittorrent Sync work?

I'm looking for an entirely Open Source alternative to Bittorrent Sync, and it seems we have almost all elements there: the Sparkleshare would do what it wanted to do, just missing the direct connection to computer no matter where using a secret...
asked by 15.12.2013 / 13:18
3
answers

Lotofácil Betting Algorithm

One of the ways to bet on lotto is to choose 15 numbers from 1 to 25. I would like an algorithm in C # to generate bets. Remember that in each combination the numbers can not be repeated among themselves and bets should not be repeated. I alr...
asked by 27.03.2014 / 15:44
1
answer

Hexagons grid - return neighbors

I'm writing a game simulator called Iso-Path. It consists of a hexagonal grid, being itself formed of hexagons You can see what I've already done on this link But I packed the time to pick up the neighbors of a certain cell. For examp...
asked by 29.08.2018 / 16:51
4
answers

What are Path Search Algorithms?

In college studies, I came across Pathfinder algorithms. The theoretical part confused me a lot and I'm limited to understand the uses of this algorithm in practice. What are Path Search Algorithms? What types are there? Which ar...
asked by 10.04.2017 / 19:28
1
answer

What is the algorithm for distributing the paragraphs?

I'm reading a specific excerpt from the Bible per week based on a schedule posted on jw.org . I made a javascript script that takes the paragraphs and verses from each chapter and shows the sum of the verses. So I have this entry: (The ex...
asked by 24.11.2015 / 00:17
1
answer

Why does 2 * i * i tend to be faster than 2 * (i * i) when i is integer?

The two multiplications, 2*i*i and 2*(i*i) , are equal and should generate the same result, which only changes is the order that the multiplications are made, but apparently they are treated differently by the interpreter. > In th...
asked by 03.01.2019 / 12:19