Recent submissions

Comment · 5 years ago
The good thing about Algorithm Design & Analysis as a topic is that there is no lack of great resources to learn from! And even better, a large portion of them are freely available online (in forms of lecture notes, or entire books, video lectures, programming challenges with online judging, etc).

In addition to what others have mentioned, here are some example resources you might prefer for a beginner-intermediate level intro:

1. (free online) Algorithms by Dasgupta, Papadimitriou, and Vazirani http://algorithmics.lsi.upc.edu/docs/Dasgupta-Papadimitriou-...

2. (free online) Algorithms by Jeff Erickson https://jeffe.cs.illinois.edu/teaching/algorithms/

3. Algorithm design by Kleinberg & Tardos https://www.amazon.com/Algorithm-Design-Jon-Kleinberg/dp/032...

4. Another one specifically for more applied view (esp., how they are used in programming contests such as ICPC) is Skiena & Revilla's "Programming Challenges" book (https://www.amazon.com/Programming-Challenges-Contest-Traini...). Note that this is different than Skiena's other popular book (Algorithm Design manual) which is also pretty good and has a "war story" based perspective to design of algorithms.

5. There are also several resources where lecture notes from university Algorithm & DS courses are very useful. Here is an example from my previous Professor, David Kempe: http://david-kempe.com/teaching/DataStructures.pdf

6. Several programming competition specific tutorials can be found on Topcoder: https://www.topcoder.com/thrive/tracks?track=Competitive%20P... (individual SRM archives are also good place to try problems first hand and then learn from other's approach). In general, if you search for ACM-ICPC resources, you will find a lot more targeted information/problems which will apply not only for leetcode, but also for detailed understanding of the theory too.

Comment · 5 years ago
I was referring to the claim made in the README's section: "Every file that could possibly exist?", which is written as if it's a proven statement:

> That's right! Every file you've ever created, or anyone else has created or will create! Copyright infringement? It's just a few digits of π! They were always there!

But yes, after you mentioned it, I see that the conjecture disclaimer is mentioned in a section at top ("What does π have to do with my data?") and afterwards the fact is assumed as true in rest of the README.

Comment · 5 years ago
It's a commonly held misconception that Pi is proven to be normal - it is NOT (it is a conjecture as of now) [1] [2]. Proving normality of number is a very hard problem, and hardly any numbers outside of purposefully constructed ones (such as Champernowne's constant [3]) are proven normal.

In fact it's not even proven that every digit occurs infinitely many times in the decimal expansion of Pi. [4]

So https://github.com/philipl/pifs is wrong in claiming that all byte stream will exist somewhere in Pi (it's not proven). Also it's worth calling out that even if Pi was Normal it will likely take more space to store the indices of two location as it will for original data itself (for at least majority of the integers), so it's not much of a "compression" strictly speaking. It's easy to see how this will work out for a known normal number - Champernowne's constant [3] -> Unlike Pi, Champernowne's constant is guaranteed to contain all the possible natural number sequences, but storing just the starting index of them in this constant is going to take much longer than the entire number itself (e.g., number "11" start at index 12 (1-indexing), number "12" starts at index 14, and so on - the size of index increases much faster than integer being looked up itself).

[1] https://mathworld.wolfram.com/NormalNumber.html

[2] https://math.stackexchange.com/a/216578

[3] Champernowne's constant (in base 10) is the concatenation of all positive integers and treating them as the decimal expansion (following "0."): 0.12345678910111213... It can be trivially seen that it contains all natural number strings. It is also proven to be Normal in base 10 (which is a stronger property). See https://en.wikipedia.org/wiki/Champernowne_constant for details.

[4] https://en.wikipedia.org/wiki/Normal_number#Properties_and_e...

Comment · 8 years ago
It all depends. Instagram was ~13 employees when bought at $1B. WhatsApp was like ~30-40 employees and bought at $19B.
Comment · 8 years ago
Talk about living in a bubble. +everything drdaeman@ said above.

There are more people using WhatsApp in India (thanks to popularity of image/video/voice-messages) than who can actually read or have usable Bank accounts. If you think they can pay "$1" for something they can get for free (and have been using for free in past), then you are completely out of touch of reality. Apart from the amount (which is not trivial btw), there is no concept of digital payment for masses.

Also I know it's hard for HN crowd to understand, but the concept of paying to protect "Privacy" is completely foreign for majority of the users in the world. I can guarantee you majority of the users (at least in India) will happily let you track them, show targeted ads at them, give you all the personal details you need, heck even give your their Genome for for free without even blinking an eyelid. And I am not saying this is just because of ignorance on their part, but rather "Who cares if they track me" - I get free services in return.

And this is actually not a bad setup really (again I know HN crowd will get their pitchforks out at it): Show Ads to provide actual free services (like WhatsApp, Google search, Maps, etc) to the masses. It's much better IMO then charging for these services and never have the masses be able to use them (like "GPS" would be a premium service for rich people).

Disclaimer: All opinions expressed are mine and only mine and have no connection to my employer (Google).

Comment · 8 years ago
You are completely mistaken if you think adding a subscription-only would not reduce usage of WhatsApp by 10x at least. I am an Indian (WhatsApp's biggest market by far), and know for a fact that hardly 1% of people using it right now in India would be able/willing to set up a payment system AND willing to pay $1 for it (which is not as inexpensive as you think) when there are so many free alternatives. And then it immediately loses its value as a messaging platform (since if my relatives/friends are off it due to forced subscription, what will I do on WhatsApp even though I am ok paying $1). #networkEffect

So adding forced subscription is a definite death sentence for WhatsApp. Also remember that even if everyone of the 1B people did pay $1 for the service, it will still be impossible for FB to recoup $19B it purchased WhatsApp for.

On the other hand, I would love a "Ad-free" mode for people who are willing to pay (like YT Premium), and ads to support other 99.xx%.

Comment · 9 years ago
Comment · 10 years ago
"The C++ Programming Language" has been updated in 2013, and includes C++11 changes: http://www.stroustrup.com/4th.html

"A Tour of C++" (also by Bjarne) is a quick overview of the language (including C++11 changes): http://www.stroustrup.com/Tour.html

Another very useful resources is the FAQs from "Standard C++ Foundation": https://isocpp.org/faq

Comment · 10 years ago
You are missing headings in Row 2 & 3.

I think you are talking about Column E (Privacy->Logging->Activity->"DNS Requests") ? Since it falls under "Logging", you want it to be Red for YES & Green for NO (you don't want your VPN provider to log DNS Requests, etc). You will notice that everything within the "Logging" columns (Col D-H) follow this color coding, whereas for Col J-M (which are still under "Privacy", but the subsection is "Activism") it's opposite.

Comment · 10 years ago
Why doesn't Google Photos work for you ? It does provide all the features you mention (depending on definition of "Nice gallery feature" of course), and on top of it really awesome search features.

Full disclosure: I work at Google (not on the Photos product though). All opinions expressed are purely mine, and not of my employer.

Comment · 10 years ago
Comment · 11 years ago
A quasi-polynomial time algorithm is one which has a worst case running time of 2^[O((log n)^c)], for some fixed constant 'c'. Polynomial time (PTIME) algorithms are a special case (where c=1).

"Greater metropolitan area" is a way of saying that Babai's proposed algorithm while not exactly in PTIME, is still very close. Indeed, in a certain sense it is now "closer" to PTIME than EXPTIME.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton