Questions tagged as 'algoritmo'

1
answer

Doubt with algorithm and vector

Help me solve the following algorithm. In this case, it is a vector of 20 positions. My doubt is what values would be stored in vector A? for (i=1, A[0]=1; i< A.lenght; i++) A[i] = A[i-1]*2; Correct answer:    a - Elements of type...
asked by 30.03.2017 / 16:43
0
answers

Apply rates according to the number of books sold

I have the following problem: A publisher pays x% to the author and it has several levels. If the author sells up to 1000unid books he receives 10% of the sale. Between 1000unid and 5000unid receives 12% and between 5001 and 15000unid receive...
asked by 23.02.2017 / 18:50
1
answer

How can I compare values in this calculator algorithm

The purpose of this algorithm is to be a small game of calculus, where it compares the result of the operation informed by the user with the correct value of the algorithm and thus to say whether or not the user has hit the result of the operati...
asked by 17.01.2017 / 04:53
1
answer

Largest palindrome product - Ruby

How to make this code faster? It works, but not fast enough. #!/bin/ruby def isPalin(mul) if mul.to_s == mul.to_s.reverse then return true else return false end end def lp(n) arr = [] for a1 in (100..999) for a2 in (10...
asked by 20.10.2016 / 19:04
0
answers

Automatic clock update in Matlab

Does anyone know how to update the clock in Matlab ? I can only update after pushing a button, but I want it to update automatically.     
asked by 14.07.2016 / 03:43
0
answers

How to calculate number of protesters

Is there any technique to help the press to make the protesters count as read a story here and was shown three research and among them is one that comes to give a 6 million difference and 300,000 counting the" Data Sheet "to" organizers "....
asked by 15.03.2016 / 21:50
3
answers

How to generate random arrays without repeated numbers on the same line?

I want to store random numbers from 1 to 60 in an array. When there are equal numbers in the rows, it is to generate another random number. Type, can not be: 11 55 55 43 49 30, but should be 11 55 52 43 49 30. There should be no repetitions....
asked by 27.08.2015 / 06:35
1
answer

Virtual page - Frame allocation algorithm

Well, can anyone explain this Frame allocation algorithm? I have already broken my head trying to understand what each function does but I can not understand the meaning. Link to the tutorial below: link // A bitset of frames - used or...
asked by 17.12.2015 / 10:55
0
answers

Call sql server procedure via JDBC that returns cursor

I am not able to call a SQL Server procedure in java that returns a cursor. That's possible, does anyone have an example? For Oracle, you can use the example link . But I need it on SQl Server.     
asked by 02.04.2015 / 20:36
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