Questions tagged as 'algoritmo'

5
answers

Remove last comma from an array

In this code below I have an array that returns me a comma at the end  exe: '98602', '98603', '98604', How can I remove this comma? if (isset($_POST['checkbox'])) { foreach ($_POST['checkbox'] as $key => $value) { $id = mysql_re...
asked by 06.03.2015 / 16:09
6
answers

Function that lists letters of the alphabet

How to convert the letters of the alphabet into an array of numbers according to its sequence? The array should start from # 1, not zero. So the letter A would be 1 , B would be 2 , C would be 3 , an...
asked by 15.03.2015 / 17:01
2
answers

Factorial Series of thehuxley.com site

Make a program that computes and writes the sum of the n first terms of the series: seriefatorial http://www.thehuxley.com/data/images/app/ problems / temp / e68085c6d699d2c7029907f994c57b80.png Input format An integer n indicating t...
asked by 04.05.2014 / 05:22
1
answer

How does the LED light encryption algorithm work?

I would like to better understand the operation of the algorithm LED step by step, mainly the process of substitution and permutation of the blocks and mainly the use of the keys in each round. Are the keys in each round expansions of...
asked by 30.05.2015 / 00:10
2
answers

How to detect when the person starts speaking using SpeechRecognition () in Javascript

I'm using SpeechRecognition (native to every browser) to be able to do voice searches on a website and I noticed that Google can identify when the person starts talking (both in "Ok google" and when the person clicks the button To talk). I tried...
asked by 23.07.2014 / 00:06
2
answers

Algorithm in C to convert arabic number to roman number

How to do this conversion? It does not have to be the algorithm ready, I wanted a help at least in logic.     
asked by 26.05.2014 / 00:41
4
answers

How to split a string in C ++?

I received this simple (I really thought it was!) challenge of creating a "tokenizer". I had to split string " O rato roeu a roupa do rei de roma " into spaces. So, after a long time, I developed the following algori...
asked by 03.03.2014 / 20:31
4
answers

Best algorithm to calculate factorial

So, I'm learning to develop in Java. The teacher asked me to develop a method for the Factorial. And also show what is happening on the screen, for example: 3! = 3 X 2 X 1 = 6 In fact, I made it happen, but is there any way for the code...
asked by 02.09.2016 / 00:35
2
answers

How to count words from a string ignoring prepositions?

Is there a service that recognizes if a certain type of word is a preposition? I want to make a word ranking of a feeder rss , but ignoring prepositions. Ignoring words with less than N characters is a good start, but maybe not enough, as...
asked by 24.02.2015 / 18:30
1
answer

How to implement the "evaluate ()" and "successor ()" method of the Hill Rise algorithm?

I'm trying to implement the Hill Climbing algorithm and this algorithm should return the sequence of cities considered good (with the smallest distance between cities) from the traveling salesman problem based on an adjacency array, however, I...
asked by 17.04.2018 / 01:16