Questions tagged as 'algoritmo'

1
answer

Check if double variable is empty or numeric

How can I check if the variable a, b, or c has not been reported, and if they were not informed return all the code? How can I also check to see if the letter "x" has been entered for the A variable in the console and set it to double 1.0...
asked by 18.08.2018 / 04:04
2
answers

Where to use accumulators in an odd and even evaluation algorithm?

Where should I fit the accumulators of this code I wrote for now? #include <stdio.h> int main() { int N; int somapar; int somaimpar; do{ printf("\n Digite um número qualq...
asked by 13.10.2016 / 21:17
1
answer

How to supply a specific amount of strings to be tested?

I can test whether a user supplied string is a palindrome or not (word or phrase that can be read backwards ignoring spaces and uppercase and lowercase letters, for example: Help me get on the bus in Morocco), using the code: string = raw_inpu...
asked by 28.03.2016 / 23:58
1
answer

Is it possible to execute multiple queries in a single execution?

I needed some data from a database in mysql. However, the data were in different tables, so the most obvious solution was to filter using the relational tables, with their indexes. But I do not know much about mysql, I even tried to use the rela...
asked by 29.12.2015 / 21:15
1
answer

Algorithm that sorts the elements of a dataset

"A team needs to write an algorithm that sorts the elements of a data set from a given criterion defined by the function. Knowing that the data set does not have an amount greater than 100 elements and that the team you do not have enough experi...
asked by 20.02.2016 / 18:54
2
answers

Ackerman function - Python

Well, I'm still learning to program in python and I came across exercise that I do not know how to solve. I need to write a function that solves Ackermann's famous function. I think I will not have problems with the syntax and logic behind th...
asked by 14.10.2015 / 00:23
2
answers

Make an algorithm to calculate the number of days elapsed between two dates

I have algorítimo done in C but I decided to do in PHP . algorítimo asks for this: It will calculate the number of days elapsed between two dates including leap years, knowing that: a) Each pair of dates is read...
asked by 23.04.2015 / 18:56
1
answer

Create function that returns random numbers in C

I need to create a function that returns random numbers without repeating between 2 ranges. I wanted to create a kind of a card game, where the cards are shuffled, and when they come back they never go out again. In my code you are repeati...
asked by 25.11.2014 / 20:04
1
answer

Insert - Jump Lists / Skip Lists

I'm trying to implement the insertion algorithm of a node in a jumps list , but I'm not making progress with the solution because I do not know at what point is that I should add the node. So far I've done this algorithm: void i...
asked by 30.03.2014 / 03:06
3
answers

(pure Js) function that filters array so that it returns unique arrays with distinct elements

var list =[ [3,4,7,9,4],[3,4,7,9,5],[3,4,7,9,6],[3,4,7,9,7], [3,4,7,9,8],[3,4,7,9,9],[3,4,8,3,3],[3,4,8,3,4], [3,4,8,3,5],[3,4,8,3,6],[3,4,8,3,7],[3,4,8,3,8], [3,4,8,3,9],[3,6,4,6,7],[3,6,4,6,8],[3,6,4,6,9], [3,6,4,7,3],[3,6,4,7,4],[3,6,4,7,5],[3...
asked by 02.05.2018 / 21:02