« first day (2201 days earlier)      last day (2748 days later) » 

8:00 PM
@ColdFire binary search on a list that needs to be sorted is still O(n log n)
 
@CarlAnderson yeah i was talking about after you have sorted it
 
ah yeah for that case you need an ordered running total so it makes sense to perform the calculation after the sort
 
I would expect the data to already be sorted for that example
why wouldn't it be?
 
because it's an interview question
 
nope it's not sorted
 
8:02 PM
why wouldn't you just use sales numbers?
 
why not sorted
 
@CarlAnderson they could be from multiple doors
 
yeah ^
 
right
so you have to make a algo or code?
apart from complexity that is
 
code it
it's really easy tho
 
8:05 PM
I think a priority queue would be useful here.
 
Today I learned about PATINDEX nice
 
naah no need i guess
nice CM
 
yeah I don't see why any item would need to be queued or have a priority
 
why so flakes?
 
CM your productivity is increasing but at the wrong direction , hehe
 
8:07 PM
You can scan all the items into a priority queue, sorted by timestamp. Then pop them while looking for largest timestamp
timestamp period*
 
CF, ?
 
but you would need to maintain the heap property for that
 
he's not looking for a large Timestamp period. he's looking for the timestamp period with the largest visitor count. that's just performing a max search while doing a linear scan
 
and in this case I think it's just easier to sort once
 
8:13 PM
@DaveS thats what I meant! When popping you can calc the people. If the PQ is backed by a linked list, you sort as you add.

But now that I'm thinking about it that would be O(n^2) vs just the O(n) load + O(nlogn) sort
 
Question: How to solve this if you cant load all the data into memory at once?
 
CM i was referring to the TIL you posted
Tristan pixel is available at a whooping 76k
 
you would use a higher complexity sorting algorithm that doesn't rely on memory for optimization
 
here
 
8:18 PM
like merge sort
External sorting is a term for a class of sorting algorithms that can handle massive amounts of data. External sorting is required when the data being sorted do not fit into the main memory of a computing device (usually RAM) and instead they must reside in the slower external memory (usually a hard drive). External sorting typically uses a hybrid sort-merge strategy. In the sorting phase, chunks of data small enough to fit in main memory are read, sorted, and written out to a temporary file. In the merge phase, the sorted subfiles are combined into a single larger file. == External merge sort... ==
 
yeah could use merge sort
 
neat
 
I knew what you were referring to. I just didn't know what the "wrong direction" meant :P
 
/o
 
hehe i mean why you are using SQL
instead of android
are you working on some db shit?
 
8:24 PM
All of my Android shit is on hold, atm
 
Ahmad, a radix sort could be faster in certain cases
 
Anyone know about makefile?
 
like if you were able to mask off the min timestamp reduce the the values sufficiently and there were enough values in n
In computer science, radix sort is a non-comparative integer sorting algorithm that sorts data with integer keys by grouping keys by the individual digits which share the same significant position and value. A positional notation is required, but because integers can represent strings of characters (e.g., names or dates) and specially formatted floating point numbers, radix sort is not limited to integers. Radix sort dates back as far as 1887 to the work of Herman Hollerith on tabulating machines. Most digital computers internally represent all of their data as electronic representations of binary...
 
@DaveS done
 
> I have made what I want in Nine Patch editor for android,
So yeah obviously Android related. It's right there in the question
Don't worry, I edited an put the Android tag back in
 
8:42 PM
whattttttt?
:P
 
Made you look
 
That gif is very flashy -__-
Lets bump it off the screen please
and
thankyou
 
yeah please trash it
 
as a reward you get 500 tristan coins, CM
 
8:45 PM
or tristan delete it
 
i think im having a seizure
 
TY
 
Fixed it
 
tyty
 
If I delete my ping to cM will it go away for him?
 
see, wasn't glink a great idea Tristan?
 
@DaveS oooh radix sort <3
I had to implement radix sort in mips assembly
 
Awe, I missed out on Tristan coins
 
8:46 PM
@eski nope
 
Nope :)
 
yeah you lost 500 coins , CM
 
oh well, cM wasn't doing anything productive anyway
 
it generally won't be faster unless you end up with a lot of items with the same timestamp
 
eski lol
 
8:47 PM
If I understand it correctly
 
I coined that term cM
 
lmao
 
This time, eski, I really wasn't. I was deleting files in my NP++ editor since I have like 30
 
you really cashed in on that one Tristan
 
that isnt productive ,CM
 
8:49 PM
Man I wish there was someone in here named Bill
@trevor-e can you help me find a cheap flight? :P
 
CF, that's why I said "
This time, eski, I really wasn't"
But I've been productive enough already this week that I'm ok with taking some time at the end of the day to do some cleanup
 
ohh i thought you were denying eski's statement
 
Nope, agreeing
 
what its only tuesday
and your week productivity is done
that is like 30% productivity only
 
Not my whole week of productivity but certainly 2 day's worth
I can't wait for Christmas to get here so I can buy you an English dictionary
 
8:52 PM
nice
 
:D
 
was gonna purchase the special magic's pun's and magic's english's edition
but now no need
 
posted on October 25, 2016 by Android Developers

By: Mary Liz McCurdy, Health & Fitness Lead, Google Play (Originally published on Android Central) It's an exciting time to be a health & fitness app developer. With people shelling out on fitness more than ever before, we're seeing record high levels of gym memberships and attendance, the rise of boutique fitness, and an emphasis on connected devices. Paramount to this growth is the i

 
Lol
 
ok gn folks
 
8:56 PM
I'm out for a little while, also. See ya
And just in time...there's Carl hi, Carl
 
lol I was just gonna say, you're just getting off before Carl stings you with a burn
4
 
lol
had a meeting, unfortunately
 
9:13 PM
we should all chip in to send cM a nice handle of Rebel Yell for Christmas
 
We should all chip in and buy me a plane ticket
 
I can only afford to spend money on the necessities Tristan, like a mechanical bull
 
with "sexy mode"
 
0-0
Apple's 15-year streak is officially over. The company just posted its first annual sales decline since 2001… https://twitter.com/i/web/status/791027181619122177
 
Crack open the champagne
 
why don't you get a job you hooligan
 
I have two
 
then buy your own plane ticket, you have disposable income, you're a teenager
 
I'm a teenager about to go into college
 
9:29 PM
just drown yourself in student loan debt, everyone is doing it
 
I mean, I'm going to be in a shitload of debt anyways. What's another few hundred dollars.
 
@flakes I actually had assumed they'd be multiple doors, but even if they did, I would hope the data would have been stored in a database somewhere instead of just concatenating say 8 different log files together.
but it's one of those things where it's ambiguous as stated, and an in-person interview is better, because you get to see if the engineer asks those questions
 
Just get your student loans in cash and bet it all on black, double it and pay off all your debts. What could go wrong?
 
@Ahmad the problem is very similar to the maxSumOfSubarray question I asked in hangouts
 
really?
I remember that being very different
what was it again?
 
9:36 PM
i can think of a few ways to do this but im looking for an opinion on the best way
i have two different datasets consolidated into a single one
if there is an instance of an item in dataset1 with the same name as dataset2 (though different objects with different values for other fields) i want to drop that item
double forloop is what im thinking but that sounds ghetto
 
use a hashmap, O(1) for insert/collision detection
so total time complexity is O(m+n) rather than O(m*n)
 
hm yea, that makes sense
 
@Ahmad given an array of integers (some negative), find a contiguous sub-array where the sum of those integers sums to the max of any possible sub-array you could choose
 
hmm
 
Example: [1, 2, 8, -15, 10, 30, -100, 30], the max sum you can get is 40, by adding the 10 and 30
 
9:46 PM
oh true
 
thaaaats recursive
 
recursion isn't actually involved JMR
 
huh, wouldnt you need to loop through every possible contiguous combination
 
in your mall example, the number of people in the mall will never be negative
 
0-1, 0-2, etc
 
9:48 PM
no
 
the maximum subarray is already sorted
and solving it is O(n)
thats outweighed by the sorting issue
 
in the mall example, you're still trying to find the maximum, but instead of returning that max, they want you to return the period of time where the max happened - essentially the indices of the array
 
im not seeing how that solves it
 
Carl is talking about a different problem
 
oh i see
 
9:56 PM
LOL
carl uses 2 space indentation
omg
one of us
 
Pixel demand exceeding Google’s expectations and causing shipment delays https://goo.gl/EAXoRH https://t.co/Hnb0KH0Vnw
 
tabs or bust boys
 
^
 
ew
 
also no { } brackets on single line if statements
 
9:58 PM
ew^2
 
that solution works?
 
why would you increase your key presses by a factor 2
 
I was thinking recursion too
 
because spaces?
 
if(something)
work();
else
otherWork();
fuck it doesnt do it right
 
9:58 PM
you can do ctrl + k to indent
 
or just tab
thats one less key to press
 
i give up
 
10:16 PM
1.5 seconds to open Intellij Webstorm
(First run)
 
@trevor-e yes, but you should be able to work through it to prove that to yourself ;-)
when I have to do the indentation by hand and it's in a web browser, you better believe it's going to be two spaces
 
I just like looking at 2-space better
 
changing the routine for the mall version would mean saving the start/end times any time you set a new maxSum
but if they're all sorted already, it's an O(n) solution to do so
 
@CarlAnderson unless I'm fundamentally misunderstanding the question I don't see how that could be correct lol
 
10:26 PM
that code does a single loop through and doesn't take into account different starting points
 
right, my code is for the maxSumOfSubarray problem
where the return value is the maximum sum that is found
 
yea
 
so if you have an array of [10, -100, 5], the answer is 10
if you have an array of [10, -5, 10] the answer is 15
in the first example the sub array is the 0th element to the 0th element
 
oh wait, I might have done it wrong in my head
 
in the second example it's the 0th-2nd elements
 
10:29 PM
query for peeps
 
it took me a while to understand
 
say I have some object with a bunch of final fields
 
but I get it now
 
and i want to make a copy of it with one of the fields changed
is there a shorthand way to do that?
i can't think of one
 
yea I didn't look closely at what the negative case was doing
 
10:29 PM
reflection - but I would not recommend
 
makes sense now
 
beyond a constructor with passed in fields
yea i thought about reflection, but bleh
 
implement clonable
 
the point is to avoid mutating objects, and instead return new objects
wondering if there's a fancy rxjava way to do it
 
or a builder, where you can pass the old object to copy in it
 
10:37 PM
m yea a builder is a good thought
+1 eski
 
\o/
 
@Ahmad only hacks and dependency injection use reflection. But then I repeat myself. :D
 
naaah dagger2 (love of my life) doesn't use reflection
 
I use reflection for tests a lot
Like with nathaniel's problem, to ensure that the copy method / builder always gets updated when a new field is added or removed, you could use reflection
I also use it for exploratory stuff with libraries
 
dude dagger 2 is pretty cool
 
10:44 PM
I'm still unsure about it
we started using it a little
 
11:23 PM
just dropping back in to post this:
 
11:43 PM
ohh, it's a lot better with the sound on
 

« first day (2201 days earlier)      last day (2748 days later) »