Better HN
topnewbestaskshowjobs
Log inSign up

jmlundberg

9 karma · joined Oct 28, 2013 (13y ago) · 4 submissions

Submissions

comment 6y ago · link · parent

Also (x+1)(x-1) = xx -1 helps if you know the squares 1x3 = 2x2-1, 2x4 = 3x3-1, 3x5 = 4x4-1, 4x6 = 5x5-1, 5x7 = 6x6-1, 6x8 = 7x7-1, 7x9 = 8x8-1, ...

comment 6y ago · link · parent

They keep adding to nine. 137×9 = 1233 . 34457×9=310113. When it breaks down: 99x9=891 sums to 18, sums to 9.

comment 6y ago · link · parent

You have got to love him as Sulu

https://en.m.wikipedia.org/wiki/Star_Trek_Continues

https://m.imdb.com/title/tt2732442/mediaviewer/rm1680690432

Edit. The episodes are free, at https://www.startrekcontinues.com

comment 13y ago · link · parent

The C++ standard library method std::nth_element states complexity; linear time on average. ( http://en.cppreference.com/w/cpp/algorithm/nth_element )

I wonder if there are other possible implementations?