« first day (2825 days earlier)      last day (2348 days later) » 

21:00
For 2 nested loops to be O(n^2), both loops would probably have to be iterating over the same list
how about [new Set(blah), new Set(blah) ... to infinite].map(x=> [...x])
That's still O(n) where n is the total number of elements in all the sets
I guess i'm just not understanding the purpose of this code. Are you just trying to convert an array of sets to an array of arrays? Why does the complexity matter if there's only one short way of accomplishing it
If you know there are m sets, and every set has n elements, then it's O(m*n)
But it's not O(n^2) unless m and n are the same number
i am getting this error
TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.
    at n (registerServiceWorker.js:39)
21:05
@KevinB because I am using it to find all possible letter combinations of a phone number in linear time and I don't know if it's possible with sets it seems like it is according to Kendall :).
You mean the number of ways a string of digits can be mapped to letters via a 10-digit dial pad?
nope i fixed it...
url from blobby  blob:localhost:5000/e0b8840f-44b7-4d4b-a99e-a5b1f62dcd6b
registerServiceWorker.js:41 url from blobby  blob:localhost:5000/3f1bb456-3f61-4e83-bc7f-25a1a92a6c7e
registerServiceWorker.js:41 url from blobby  blob:localhost:5000/28bff8b1-58b4-48a0-b1d2-e607aa67663c
registerServiceWorker.js:41 url from blobby  blob:localhost:5000/c8c66381-035e-44d6-ba9d-2007f55ebf32
registerServiceWorker.js:41 url from blobby  blob:localhost:5000/c5ae482d-6184-42d5-bb5a-4a967caec6ad
nice.
That seems like roughly O(3^n) since there are usually 3 letters to a digit
now what can i do with that?
I have to iterate over [[a,b,c],[d,e,f],[g,h,i]] and the only way I can think to do it is by moving from left to right
21:07
or rather... in what context and where is this supposed file?
@Rick You're trying to do it in linear time relative to what? What is your n?
the number of digits in the phone number?
correct
and you have, what, an array like [[], [], ["a", "b", "c"], ...]?
I assembled my own array by unzipping the number with the keypad_key of hashes
Sounds like O(m^n) where m is the average number of letters that can be mapped to a number
21:12
so 949 would [[w,x,y,z],[g,h,i] etc...]
a standard dialpad is about 3
@Rick Wait what? You're going to have to explain.
I will one sec
Are you mapping digits to sets of letters as an intermediate step?
correct
I map the numbers to an array of letters
After that step (which would be O(n)) you're left with O(p) where p is the product of the lengths of all the subarrays
21:15
but that is not where the hard part is
since you have to iterate every combination, and there are p of them
so 949 would be 4*3*4
ya but only moving from left to right so 9 before 4 and 4 before 9
Basically, though, you're stuck with exponential time compared to the number of digits
and exponential time is slow
unless your n is low hahahaha
but I can't do it without two nested loops, were a subset iterates over the target set
I thought recursion with memoization would make it possible in linear time
21:18
You probably need some kind of recursive algorithm
memoization isn't going to help, because you're only getting each combo once
you need to return p results, so your time cannot be lower than O(p)
no always there might be repeating pattern in the number order
so 301 232 3232
That won't help
because repeated digits don't necessarily mean repeated letters
you might be right because I was not able to create a mechanism to handle that case in the recursive approach. But I was thinking of maybe I could use a marker like '!' to separate the arrays and keeping track of that
so I am iterating over the array only once but it seems really difficult to do
thanks again @rlemon super nasty... but may i ask you about those blob formats
can you explain how that happens and why it is now a blob
and is there anything that can be accessed from that blog then its obvious file type
ahh i see the problem they are set to text/plain
@KendallFrey that helped! I'll be drilling your mind for more time complexity stuff in the future :)
21:48
ok @rlemon this is a fork of what you just did... jsfiddle.net/mydkx1b4
all i added was a log to console out the resoponse
the response is there.
ahhh haa it was something in my code
why does this work
      // return fetch(url).then(resp => {
      //   console.log('resp from new fetch ', resp);
      // })
but not this
function status(response) {
        console.log('resp from new fetch ', response);
        // if (response.ok) {
        //   console.log('this is ok ')
        // } else {
        //   console.log('this is not ok');
        //   throw new Error('Network response was not ok.');
        // }
        // return response.blob();
      }

 return fetch(url, {headers: myHeaders, mode: 'no-cors'})
      .then(status)
      .then(blobStuff)
        .catch(function(error) {
          console.log('Fetch 22222 Error :-S', error);
the response never comes from that call
Maybe try narrowing it down a bit
lol i figured it out
on my get request i had mod: no-cors
that is what was screwing up my response...
Again, @rlemon thanks for your help
do you have a venmo or a paypayl
ill buy you a beer
22:05
buy me a beer having to endure your consecutive page long posts
tell rlemon i owe him a beer... i'll be back tomorrow
you get a soda
i'll buy you a soda
22:40
@ChristianMatthew said he'd buy everyone in the room a beer.
 
1 hour later…
user1596138
Weird
user1596138
Wonder if they have them the other way around

« first day (2825 days earlier)      last day (2348 days later) »