Afişează mesaje
Pagini: 1 [2] 3 4 ... 57
26  Comunitate - feedback, proiecte si distractie / Blog / Problem: Marbles Game : Ianuarie 31, 2016, 01:37:38
http://www.infoarena.ro/blog/cups-and-marbles
27  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Problem: Prime Number Generator : Ianuarie 25, 2016, 11:25:19
Dan, I was thinking of the same idea. Use eratosthenes sieve and each time I run out of prime numbers, double the array and run the sieve again.

Tomek has a solution that is not amortized which does log n log log n work for each number.
28  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Problem: Prime Number Generator : Ianuarie 25, 2016, 10:54:30
Neat, I was thinking about amortized Smile. But I guess one can do it as fast and not amortized Smile.
29  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Problem: Prime Number Generator : Ianuarie 25, 2016, 10:42:02
Is it amortized?
30  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Problem: Prime Number Generator : Ianuarie 25, 2016, 09:10:51
Yes
31  Comunitate - feedback, proiecte si distractie / Blog / Problem: Prime Number Generator : Ianuarie 25, 2016, 08:43:10
http://www.infoarena.ro/blog/primegenerator
32  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Problem: Resource hog : Ianuarie 25, 2016, 08:30:32
Good job Lucian. That's the step I was waiting for!

C++ has

— Built-in Function: int __builtin_clz (unsigned int x)
Returns the number of leading 0-bits in x, starting at the most significant bit position. If x is 0, the result is undefined.

as a builtin function. Some processors also have it as a built in function so the algorithm now has O(1) time per query/update.
33  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Problem: Resource hog : Ianuarie 08, 2016, 14:58:19
@Szilard Yes it can. Good comment. I'll update the question.
@Dan Pretty good! That's the idea, but you can make that binary search step a bit more efficient. Also you meant log 32 not log log 32 right?
34  Comunitate - feedback, proiecte si distractie / Blog / Problem: Resource hog : Ianuarie 08, 2016, 14:23:27
http://www.infoarena.ro/blog/resourcehog
35  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Interviu cu Matei Zaharia : August 14, 2015, 18:26:55
Doua alte interviuri cu mai multe intrebari legate de Spark

http://softwareengineeringdaily.com/2015/08/03/apache-spark-creator-matei-zaharia-interview/

https://www.reddit.com/r/IAmA/comments/31bkue/im_matei_zaharia_creator_of_spark_and_cto_at/

Si cateva sfaturi pentru concursuri de programare
http://people.csail.mit.edu/matei/programming_contests/
36  Comunitate - feedback, proiecte si distractie / Blog / Interviu cu Matei Zaharia : August 14, 2015, 10:44:26
http://www.infoarena.ro/blog/matei-zaharia
37  Comunitate - feedback, proiecte si distractie / Blog / Balance : Iulie 29, 2015, 09:40:28
http://www.infoarena.ro/blog/balance
38  Comunitate - feedback, proiecte si distractie / Blog / Hill Climbing Shortlist : Iunie 23, 2015, 06:05:51
http://www.infoarena.ro/blog/hill-climbing-shortlist
39  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Heaps shortlist : Iunie 20, 2015, 10:26:34
1. O(n) remains unsolved.
2. O(n log k) solved.
3. O(n log k) solved.
4. Solved in O(n log k) and O(k). One can actually solve it in O(n) time and O(k) additional space: http://www.infoarena.ro/blog/problema-saptamanii-stream-solutie
5. See 9.
6. Solved in O(k log k). One can actually solve it in O(k) (http://www.sciencedirect.com/science/article/pii/S0890540183710308)
7. O(n) solved.
8. Solved.
9. Solved in O(k log k) but one can solve it in O(k) (http://www.cse.yorku.ca/~andy/pubs/X+Y.pdf)
10. Remains unsolved. An O(k) solution is fine.

Good job so far.
40  Comunitate - feedback, proiecte si distractie / Blog / Heaps shortlist : Iunie 17, 2015, 07:48:28
http://www.infoarena.ro/blog/heaps-shortlist
41  Comunitate - feedback, proiecte si distractie / Blog / How to get promoted in Silicon Valley : Iunie 13, 2015, 08:01:23
http://www.infoarena.ro/blog/how-to-get-promoted
42  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Shortest Snippet : Iunie 11, 2015, 20:53:25
The first solution is a good attempt, but sigma can be big and you can improve on that.

I didn't understand much in your second solution. (right isn't defined)
43  Comunitate - feedback, proiecte si distractie / Blog / Shortest Snippet : Iunie 11, 2015, 05:46:13
http://www.infoarena.ro/blog/snippet
44  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Probability puzzle: Cars : Noiembrie 14, 2014, 08:14:56
Alex, the two problems are equivalent.

If A is the array of numbers in the min = a[ i] problem, then reverse(A) is the set of speeds in the car problem (if cars are going from left to right and A[0] is the last car).

On your example A = N .. 1 - n updates, reverse A = 1 .. N - n clusters

BTW 2 sqrt(n) is the average length of the LONGEST increasing subsequence, while here it's not the longest one.
45  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Probability puzzle: Cars : Noiembrie 14, 2014, 07:56:15
Alex, no, it's not 2 sqrt n
46  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Probability puzzle: Cars : Noiembrie 14, 2014, 07:44:24
@Radu I should put the puzzles when Boston sleeps and Romania is up so it's not solved as quickly Tongue.
47  Comunitate - feedback, proiecte si distractie / Blog / Probability puzzle: Cars : Noiembrie 14, 2014, 03:45:13
http://www.infoarena.ro/blog/cars
48  Comunitate - feedback, proiecte si distractie / Blog / Interviu cu romanii de la Talentbuddy : August 14, 2014, 01:38:31
http://www.infoarena.ro/blog/talentbuddy
49  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Interni romani in Silicon Valley (generatia 2014) : Iulie 26, 2014, 23:26:10
Ciao,
  imi pare rau pentru disconfortul cauzat. Sper ca poti edita si sterge numele.
50  Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Interni romani in Silicon Valley (generatia 2014) : Iulie 25, 2014, 10:43:09
Poti sa ii adaugi daca sunt interni anul asta.
Pagini: 1 [2] 3 4 ... 57
Powered by SMF 1.1.19 | SMF © 2006-2013, Simple Machines