1

answer

Is there a reliable algorithm that can perform a binary search in a list where the size ( length or count ) of the list can not be considered?
I know one of the requirements for a binary search is to know this size to split the l...

asked by
30.07.2015 / 14:37

1

answer

I bumped into an interesting problem again during an interview. Unfortunately I am also not sure that I found an optimal (or good enough) algorithm. I thought about sharing to see if anyone knows a classic solution or a more efficient variation...

asked by
26.05.2014 / 03:26

1

answer

According to Wikipedia in English:
The bitmap algorithm (also known as o-shift or, offset and or
Baeza-Yates-Gonnet algorithm) is a sequence of correspondence
approximate algorithm. The algorithm indicates whether a given text
contai...

asked by
24.02.2015 / 04:38

3

answers

A palindrome is a word or phrase that has the property of being read from right to left or from left to right. For example, strings "aaaaa" , "1221" , "bbaabb" are palindromes, however the string "chef" is not a palindr...

asked by
28.03.2016 / 21:53

2

answers

Well, as a college work, I have to create an algorithm that, given a certain file with x numbers, is able to verify which is the largest sequence of numbers that, based on 6, respect the following rules:
The string must be growing
From o...

asked by
04.06.2015 / 06:19

1

answer

I have the following situation: I need to set the days of each week within a month, creating an array of JSON objects.
Each position would correspond to a week, for example if there were 5 weeks I would have an array of 5 positions, where eac...

asked by
12.05.2016 / 16:16

1

answer

Any algorithm with complexity that involves a "log", has recursion involved? Type: O (n log n). If not, when will you have "log" in some complexity?

asked by
11.05.2016 / 23:30

1

answer

I need to argue that the solution found after executing the Gulous Algorithm of Prim is optimal. But I do not know how, could anyone help?

asked by
02.03.2016 / 02:50

3

answers

I need to round numbers in such a way that they have only one decimal place worth 0 or 5.
For example
1 -> 1
1.1 -> 1.5
1.4 -> 1.5
1.5 -> 1.5
1.6 -> 2
2 -> 2
Does anyone know of a simple way to do this?

asked by
17.05.2014 / 18:29

2

answers

print ("ESCOLHA A CERVEJA PELO NUMERO")
print ("1-ANTARTICA R$6.00;2-SKOL R$6.50;3-BRAHMA R$8.20;4-SOL R$8.25;")
cerveja = input ("5-NORTENHA R$16.80;6-PROIBIDA R$4.80;7-DEVASSA R$5.90;8-HEINEKEN R$9.00")
q = float(input("Quantas ???"))
def cas...

asked by
26.10.2015 / 05:30