Questions tagged as 'algoritmo'

4
answers

I need different ways to rearrange characters within a string, how do I do this?

I would like answers in C, C #, or just an algorithm, but preferably an implementation already in the C # language because that's what I'm using. For example, suppose I have to find out if a number is read in the same way both ways - a silly...
asked by 07.09.2015 / 20:57
5
answers

How do I find the position of an item in a list?

I am writing a program that receives a specific amount of values, and returns the lowest value in the list and its position. It is as follows: quantidade = int(raw_input()) numeros = raw_input() NumerosNaLista = numeros.split() if len(NumerosN...
asked by 10.04.2016 / 00:18
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

How to remove characters from a string?

The program should read two strings and remove from the first string all the letters that occur in the second string. Example: Let the strings be "chocolate" and "hollow", so the program should print "hlte". How to solve the problem using string...
asked by 28.03.2016 / 20:42
1
answer

Big Notation O - Complexity O (log n)

I have some questions about this complexity, what base is used in this logarithm, 2 or 10? it's because? Looking at google I saw some comments saying that the base did not matter .. Is the logarithm deeply linked to this complexity or is it used...
asked by 01.04.2018 / 06:59
2
answers

Generating a pseudorandom number based on an entry

I need to generate a random number based on another input number, so that for the same input number, the function must always generate the same output number. For example, meuRand(4) would always return 236 (or any other number), and...
asked by 14.05.2014 / 02:54
2
answers

Algorithm for calculation and distribution of elements on the screen

We are here in the company wanting to create a showcase with the effect of style reorganization which is used by the stackexchange itself link I've been thinking of position calculation algorithms, but I'm not getting anything conclusive on...
asked by 06.02.2014 / 17:33
2
answers

Binary search tree and binary search (Binary search tree)

As far as I understand, the binary search tree algorithm works at the end of the day, just like the binary search algorithm, with just a few changes, correct? Being more direct: the binary search tree is the implementation of the binary searc...
asked by 16.03.2018 / 22:00
1
answer

How to make a screen recorder?

I'm wanting to make a screen recorder. What I thought of doing was this: From the recording event hit 30 screenshots per second and then join them in sequence to form a video. At this point some doubts arise: Is this the right way to think a...
asked by 21.10.2014 / 14:24
2
answers

Algorithm to calculate the sum of the numbers typed in portugol

I'm using Portugol Studio to study algorithms in English. And I have a difficulty in an issue that the teacher has passed. The question is as follows:    Create an algorithm that prompts the user to enter 10 numbers   any integers. Print t...
asked by 11.04.2017 / 20:11