It's pretty quiet here, so I'll just post any solution. Feel free to add restrictions.
Memory O(k), time O(k^(4/3)log k).
We put the number 1 in a priority queue. Then, we repeat the following steps k times.
1. Extract the smallest element x from the queue. 2. Output x. 3. Put 2x, 3x, and 5x into the priority queue.
One has to take care of de-duplication either at step 1 or at step 3, but this doesn't change the asymptotic complexity.
There are a=O(k^(2/3)) elements in the queue and each is b=O(k^(1/3)) bits long. Therefore, the memory complexity is O(ab) and the time complexity is O(kb log a).
Find a peak element
-
Given an array of integers. Find a peak element in it. An array element is
peak if it is NOT smaller than its neighbors. For corner elements, we need
to ...
SearchCap: The Day In Search, May 17, 2013
-
Below is what happened in search today, as reported on Search Engine Land
and from other places across the Web. From Search Engine Land: Google’s
Matt Cutt...
Facebook Launches Offers For Android
-
Facebook announced Friday that it is making offers available to Android
users. In April, Facebook made mobile offers available to iOS users.
Facebook poi...
Sending money as an attachment to email [#money]
-
Gmail to allow money to be sent as an attachment "Pretty soon, U.S. Gmail
users 18 and older (sorry, kiddies) will see a dollar sign icon among their
Gmail...
Firefox 22, beta con ripensamenti
-
La nuova versione contiene miglioramenti sul fronte delle prestazioni e
delle video-chat senza plugin, Per il blocco dei cookie di terze parti ci
vorra' an...
The MOOCs Degree
-
Earlier this week Georgia Tech announced the Online Masters of Science in
Computer Science, a MOOCs-based degree with a total tuition of about $7000.
This ...
Launching the Quantum Artificial Intelligence Lab
-
Posted by Hartmut Neven, Director of Engineering
We believe quantum computing may help solve some of the most challenging
computer science problems, partic...
Live from Google I/O: Mo’ screens, mo’ goodness
-
This morning, we kicked off the 6th annual Google I/O developer conference
with over 6,000 developers at Moscone Center in San Francisco, 460 I/O
Extended ...
Platform Updates: Operation Developer Love
-
Since last Wednesday's update, we explained how to Create Beautiful
Sections for Your App on Timeline including best practices for creating
them and trac...
A multi-screen and conversational search experience
-
Search has always been about giving you the best answers quickly,
regardless of what device you use. At Google I/O today, we gave an update
on where we are...
A multi-screen and conversational search experience
-
Search has always been about giving you the best answers quickly,
regardless of what device you use. At Google I/O today, we gave an update
on where we are...
Boldly Go Where No Homepage Has Gone Before
-
On the Bing homepage, our mission over the past 5 years has been to help
you explore the world around you, to seek out new views and new angles.
Today, ...
What to expect in SEO in the coming months
-
We just recently taped a new round of webmaster videos, and I thought this
video deserved a full-fledged blog post. This is my rough estimate (as of
early ...
Five short links
-
Photo by Curtis Perry The Declassification Engine - "Saving history from official secrecy". A fascinating concept that shows how the firehose of cheap distri...
Videos as (part of the) solution to assignments
-
Anna and I are running a three-week, intensive, first-year course in which
the students use Uppaal to make models of computing systems and games, and
to an...
Blogging is dead, but have we fixed anything?
-
Google Reader is shutting down, but most people moved on long ago.
Blogging is dead. To the extent that it lives, it is dominated by
professional journali...
The Power Method
-
This week, the topic of my online course on graph partitioning and
expanders is the computation of approximate eigenvalues and eigenvectors
with the power ...
Congratulations to Justin and Jon
-
Justin Thaler and Jon Ullman had back-to-back thesis defenses today. Both
talks were excellent -- Justin's on his work on verification methods (for
cloud ...
An invitation to #ComedyFest (BYOB)
-
This week Twitter is turning into a comedy club, and you’ve got the best
seats in the house, all for the price of free. We’re not saying that
enjoying your...
Lighthearted Symmetry
-
I was in a conversation with thoughtful and confrontational folks --
technical people --- sometime ago, and they asked me in a provoking way,
"what is the...
Microsoft Research Mood Board
-
Microsoft Research Mood Board is a Windows application that combines image
search, image collection, and sketching to support creative activities.
A reminder about promotional and commerce journalism
-
Posted by *Richard Gingras, Sr. Director, News & Social Products*
*
* **
**
*Credibility and trust are longstanding journalistic values, and ones
which we...
People Driven Development
-
At every stage of the software development process, I like to put people
first. I’m deliberately using the generic word people instead of the more
common u...
A Microsoft Without Sinofsky?
-
Well, I can't believe it: Microsoft Announces Leadership Changes to Drive
Next Wave of Products.
People walking the hallways tonight at work certainly can't...
It's pretty quiet here, so I'll just post any solution. Feel free to add restrictions.
ReplyDeleteMemory O(k), time O(k^(4/3)log k).
We put the number 1 in a priority queue. Then, we repeat the following steps k times.
1. Extract the smallest element x from the queue.
2. Output x.
3. Put 2x, 3x, and 5x into the priority queue.
One has to take care of de-duplication either at step 1 or at step 3, but this doesn't change the asymptotic complexity.
There are a=O(k^(2/3)) elements in the queue and each is b=O(k^(1/3)) bits long. Therefore, the memory complexity is O(ab) and the time complexity is O(kb log a).