 All right, everyone welcome to day 22 of the additive code Yesterday we did day 21 and we had a bit of a rough day 18 actually it was about parsing We know parsing. We're doing Haskell good at parsing, but It was rough. I was I Was exhausted at the end of it, but it was a three-hour stream. I think we'll only do day 22 today. I Don't know if it's hard or not, but Let's see. Let's see how it goes all right, let me Get this started and let's look at today's problem If you haven't been watching the entire time you can catch up on YouTube. There's a link There's a link to the playlist on the bottom like under where the stream is I think like depending on where you're watching of course and And there's like a playlist with all the videos so far, so it's good All right, we're gonna do some crap combat. Oh, she Space cards. Okay, cool Okay, we're We're playing cards with a hey sir. See you again Nice to see you. What's up? Hi doing today, sir. See you still darting around. I haven't made you switch to Haskell yet. Have I? Takes a few days Let's see. So we doesn't take the credit. Okay You're the game saw spit the cards up so each player has their own deck Then the game consists of a series of rounds Both players draw their top card and the player with a higher value card wins around The winner keeps both cards plenty on the bottom of the X So the winner cards are above the other card is this cause the player to have all the cards even in the game ends Okay, I'm gonna I'm gonna grab my Thanks, RC. I'm gonna grab my drink. I have I have some Apple scene How you all doing? The very good drink. It's just like a slit like Fanta like a local version of Fanta pretty good And we drink it out of a fancy class. I mean, it's just a soda But bringing out of a fancy class makes you look good, right? Hmm, you don't love the Fanta. I Think that has decent. I'm not such a huge fan of Fanta actually, but I Like Apple scene. It's got that good stuff. Okay, so Why okay, so what's the rule so split the cards so he spends his own deck Then the game since he's around both those draw their top card and the player with a higher valued card wins around Okay The winner keeps both cards placing them on the bottom of their own deck so that the winner's card is above the other card Okay, so play so they don't draw their top card and the player with a higher valued card wins the round. Okay So they placed both on the bottom of the card so that the winners card is above the other card If this causes a player to have all of the cards they win and then green Yeah, Fanta is good, right? Classic joke thumb Okay, so so so place one that contains five cards with nine on top Yeah, yeah, nine and then five and they both draw a nine and five and then player one wins around and Then they place the nine and five. Yeah on the bottom of their deck exactly Okay, and then six and four and then three and seven. Okay, so it goes and it goes and it goes Once the game ends you can calculate the winning players score the bottom card is in our deck is worth the value of the card multiple by one Sack it from the bottom sort the value of their card multiplied by two and so on. Okay With ten cards the top card is worth the value on the card multiple by time Okay, I See I see I see I Let's just take the two decks So, how do we how do we How do we start this off? I mean, I think like, you know like we've done some days before We've done like program and analysis, right in the sense that you know, we we we oh shit We we kind of figure out Directly what the order will be but here, you know this time, I think we're just gonna simulate it or I Don't think it'll take that long Let's see test input Okay No, let's let's just look at the real input Just a list of numbers. All right. Okay. Let's see. Let's see. Let's easily a day 22 module main where In IO Main equals. Oh, no Okay, let me see Yeah, like this main equals Do No, we're gonna get input Test input Over to print Okay, so what's our test input gonna be? Let me see. I'm gonna tweet one tweet Right now. Are y'all ready for my tweet a very funny tweet Me my friend. I just waited it. It's good. It's good stuff me my friend Gabriella Took a funny picture. Okay. Let's see get input So we're gonna say get input. It's gonna take in a file path IO list of list of a pair of list of numbers, right? Okay get input equals so We are going to say So we're gonna say, you know, we're gonna take So we're gonna say fmap to pair per of Read file and this is just like this. Yeah, and then where to purr Is a text and string and return so list of IO int now to purr, it's gonna take the stir and we're gonna say where P1 P2 is break Equal equals The empty which languages, you know, you know might like actual human languages Icelandic my native language English. I hope I know it. I hope you understand what I'm saying I know some German. Oh Programming languages. Oh My god, sir. See well, I know Haskell. I know I use Python and Haskell mostly I use see a bit. I Don't like see it's too dangerous. I mean it's like a wild question, right? I don't like see I saw I've tried I've dabbled in rust Dabbled in rust, but I I still don't know. I still don't know the error message is quite well enough. So Working on that. I know. Oh, yeah, I know Java I programmed in Java a bunch I've done a little bit of Scala a little bit of closure I did some Lisp I Did I I've written a little bit of pro pro like I mean I do I do research on programming languages, right? So I've just been I've just like fiddled around with a bunch of them But I like Haskell is the one I like it's like if it's there, right? It's it's the right spot for me Python is pretty fun. Also Python is pretty fun. Also Yeah, that's my main like so a Java Java. Yeah, and then you know, I you know, I've had like Programming interviews like where they're like, you know solve this and go Ah, or like not solve this and go but like, you know, hey take this problem I like there's a here's a go program and fix a bug in it, right? And I could do that, right? So, you know, it's easy to oh, yeah, and JavaScript to of course. Yeah, JavaScript and typescript I've written in those Those are good, but you know, I don't kind of, you know JavaScript Java see I Mean they're all kind of the same Very similar languages, right? So, you know, if you know one of them very easy to switch You just need to you don't need to learn the language. You just need to know the difference, right? Which is easier So we're gonna break here's gonna be player one We player two so it's gonna be player player It's gonna be like the line and then pray prayer to and then p2 is gonna be a a read P1 To I think it's like this. Let's say day 22 G8c day 22.hs. Oh three. We wanted to go fast Uh-oh, we're a break stir right and Read it and we Oh, yeah Break on the line sister and p1 Okay, yeah, this is Map read and map read. Let's see what happens Nice Wow Well, you like Yeah, good Okay, let's see. I like you too, Cersei. You are interacting That's what makes it a fun stream, you know, not just me talking I want to be talking to you as But you know, I also want like quality over quantity, you know, it's better to have a few people that That you can just talk to and have a conversation with them like too many because then you can't talk to them, right? There's too many of them Yeah, okay, we read the input. That's good. Let's see now simulate the game, right? And Let's write the score function now score is gonna take a list of ints. It's gonna return as an int Score is going to be so sip with So we are going to some sip with So we're gonna go from zero to and then we're sipping with so A final and we're sparing with a final and What are we sipping with? We're actually gonna do here Yeah, so we're sipping with we're gonna take in, you know the index The index and we're gonna take the number and we're gonna say, you know Where Lf is the length of the final and it's gonna be a Lf Minus i times n It's gonna be our score function Now let's test it out. What was the score print? dollar score dollar Yeah, so here's the final deck Let's just say result should be Just of ints This is what our final result should be. No, let's result should be Yeah, and then we need to say do Link it compile it write. Let's see what happens 206. Okay our score function Calling one right. We got it right away good Good stuff. Let me let me put on some different music I like this this is monster cat. This is a I Have a I have a deal with them. I bathe them $5 and I can play their music On my stream. How's that? Okay, so our score function is correct. Now we want to simulate Simulate it's gonna give us a it's gonna take, you know, it's gonna take in a list of int comma comma int and it's gonna return a list of int Simulate is the same as simulate Prime and it's actually, you know, no wait, okay, so simulate of you know an empty list and X's equals X's Simulate so we don't know which one of them is gonna end up to being the empty list X's Okay, now simulate so neither of them is empty a AS comma BBS Okay, so here we run into the problem that we have to be adding to the end of the list, right and That's not fast in Haskell so we need to use something called sequence and turn our lists here into sequences Which use finger trees, I used this trick before but Pretty cool pretty cool Now this is gonna be a Import sequence. Yeah, this is gonna be a seek of int and this is gonna be a seek of int And let's see here now Okay, yeah, let's qualify it qualified and seek import data sequence seek Now this is going to be Let's look at data.sequence So if this is Seek that empty Let me return X's so we're gonna return a seek No, actually we're gonna say just like seek dot To list of X's It doesn't have to list but we can't go back to a list This is how I feel wet Do I need to traverse it or something like that? Let's see let's figure it out I'm gonna pray my like really like this song Data dot foldable Okay, they really should have this in secret now. It's not empty. It's gonna be one of these right Okay, so and then we say, you know If a bigger than B, what do we have? What are you doing tie bricks? Let's see Both winner so both straight road talk and it played with a higher value card wins around Okay. Oh, okay. Yeah, so they all have different cards. There's never gonna be an equality. Okay if a Bigger than B then Simulate We're gonna take so if a one then we're gonna say a s and we use this operator a comma PS house Simulate a s comma B B a Bs Okay, what is the name of this pattern? Is it is it like a Okay, oh I have to do colon first Okay. Oh my god. Yeah, let's let's just import those directly, right? All right, I think it's happening, let's say We need to turn them both into sequences which we do like this We just say a here back to six Let's just simulate. Let's get out get out what happens if you simulate the first one Okay, and this looks like the order. Yeah, three two ten six eight five Six eight nine four seven one nine four seven one. Yeah. Okay. Good Now we say print score Right now we need to get the input Let's get it when you're ready Come and get it. Okay, let's run it see how fast it goes by saying measure command Day 22, and we had to say here. Oh, I have to split it against you So you can see I can barely see it right up like this out Default, let's have it all the way here. Yeah. Okay. Let's write Wait run it twice remember because the RTS takes over along the boot 21 real seconds three three four two one. Let's see Three three four two one and it works You always gotta do the dance, you know, even if it takes you 20 minutes to solve You gotta do the dance. That's That's just the rules of Advertisement of code All right, let's see. Oh you we lost to the small crowd. Oh, no Crabs aren't very good at recursion to defend your honor your chances crab to a crack game or recursive combat. Oh Baby We're already using recursion, bro. It's gonna be epic. Okay, it's putting the cards to do two decks Okay, then again, so it's here's a rounds for the few changes before either player is a card If there was a previous round in this game that had exactly the same cards in the same order in the same player decks The game instantly ends in a win for player one I Don't think this will happen, but let's fix it and Let's see. Oh my god What's winning players score? Okay, let's just keep reading. Let's keep reading So, okay, so if it ends with a win for player one, okay? Okay, we don't want infinite games of recursion. Okay. Okay. Otherwise this rounds cards must be in a new configuration The players begin the round by trying to double off If both players have at least as many cards remaining in their deck as the value of the card They just drew the winner of the round is determined by playing a new game of recursive combat Cool cool cool cool Otherwise at least one player must not have enough cards left in their deck to recurse the winner of the round is a player with a higher value card Okay, this is crazy stuff, right? My tweet is hilarious. Okay Go check it out. And that's why I'm smiling so much. I'm getting like feedback on the tweet All right, let's see Both days at least many cards remaining in their deck as a value of the card They just drew the winner of the round is determined. Yeah, okay There's a lot of rules here if players have at least as many cards No, Doug is a number of the cards that you still don't want to run a certain record in the sub game. Yeah Yeah, okay So before either player deals a card if there was a previous round in this game That had exactly the same cards Okay, so Okay Okay, okay. Okay. Okay. So we have we have Such a good tweets damms Okay. Anyway Simulate okay simulate with subs Okay, so here we have Now okay, so if they're empty so then we don't care. Okay, so we're gonna have Let's just right here type game state I Dex it's more accurate, right? Mm-hmm. Okay, let's just right here. So okay recursive combat Okay, so we have the let's let's let's comment this out so we have the decks Actually, let's so we have the map which goes from decks Now we have the previous which is just a set of decks. Okay, so we don't actually need to Look up the value, right? So we just have a set of decks So we're gonna say here import data dot set set import Qualified data dot set as set Let's see. So okay set of decks to decks and to Recursive combat. Okay, so we have Okay, so we have here we have that prev and then we have the these the decks, you know D1 D2 equals so So if it's a case that D set that member If it is a member of the previous Then Let's actually return a so type Deck is a seek of int and then this is gonna be a pair of decks Okay, now if D is so this is that so if D is a set member of prev It ends with an instant win for player one. This is that it's D1 so otherwise a recursive combat Prav the add D1 comma D2 that's gonna be Where prev is set dot and insert My god So then we're gonna say, you know D. We're gonna set it into the previous game states, right? Rev so, okay, so Otherwise this rounds card machine big big good new kind of progression that the players begin their round by each drawing the top card of the deck has normal So I think also, you know, we also have these rules, right? I think we also have this right so recursive combat You know, whatever if either of them is Empty then we just Then we just return that deck, right Okay, otherwise so neither of them is empty. So then we then they both have, you know D1 And then what like this? Yeah D1s D2 D2s Okay, and then they both draw the top card of the deck and that both players have at least as many cards remaining in their deck As the value of the card that yes true Okay, so, you know, so okay, so here we're gonna say so you have to play another round, okay? So here, okay, so if it's a case that D1 At least as many cards remaining in their deck as the value of the card. They just drew I guess so this is gonna be size Seek that size and length D1s So yeah, so they need to have So they both so then it then There's a new game of recursive combat. Okay, so we don't know what to do here yet But if so if either of them So if either of them do not satisfy that constraint then At least one player must not have enough cards less than their deck to recur so when the round is a player with the higher value card if D1 larger than D2 Then D1 else D2 No Then yeah, we return their deck It's good stuff. Let me see D1 s. Let's see. I think this music is a bit too intense, right? Let's go here Let's play this lo-fi is better, right? Hope so Let's see. It's a recursive combat. So this is let's just return and yeah, let's just return a bull here So in player one zero the player one This is player zero If D1 is D2 then zero else one If both players have at least as many cards remaining in the deck as the value of the card Did you see the wind around is determined by playing a new game of recursive combat as in regular combat The winner of the ground takes the two cards dealt at the beginning of the round and places them on the bottom of their own deck So maybe like this decks So we return the decks here Here but here it's gonna be player one, right? Okay, so yeah, so if it's if it's a previous configuration Okay, so I'm just gonna assume that we're not gonna hit the case that it's a previous consideration and I Mean we already checked that they're empty, right? D1 D1 s D to D2 s is going to be D1 s With D1 and then with D2 I think and then we actually have to do it like this D2 and then D2 s so player what this is when player one wins Then this if yeah, okay, so here is this when Let's say this is player one wins else player two wins D2 D1 And then D1 s Okay, let's see. Let's see what happens for recursive combat. Otherwise. So how do we play a new game of recursive combat? If they won the round due to winning a sub game Yeah, if collecting cards by winning the round causes a player to have all the cards they win and the game ends Yeah, so here the game actually ends, right? So this is gonna be A deck okay, it's gonna be a deck out here. This is gonna be Before if there was a previous round in this game a Game the game Instantly ends in a win for deck player one Okay, it's a bit bit rough. I think Okay, I'm having a hard time Figuring this out so okay So if there was a previous round in this game, so they play a round of the game the game Instantly ends in a win for player one Otherwise, so yeah, so they will play a sub game So, yeah, okay, so I think the entire if if I let them run out entirely Yeah, okay. Yeah. Yeah. Yeah. Okay, so so So here it the round ends in a win for Poor player one So this will just end the loop Now here the round ends With a win for player one So here So here the this round ends. Yeah, there's no sub game Okay, so here we actually recurse. Okay, so let's see And this so this is gonna be you know Case Recursive combat of said that empty D1 s D2 s Oh So if we ended up with you know either of these in the sub game we returned. Yes Then the whole thing is over right Ziggy dot empty and the other one was D2 then the whole thing is over Otherwise, the whole thing is not over and We are looking at a new game Here we we played the sub game and Okay, so yeah, sorry Otherwise it's gonna be Yeah, so res is gonna be a recursive combat of of Set dot insert a D of Use it on res right? Yeah, is this gonna be it? Let's see game one is the primary game. Okay. Let's just run it. Let's just see what happens I think I don't think we'll get it to a loop. I Think we might just get the wrong result Okay, that did not end in the Right way, right? Let's see Okay, okay, okay. I think maybe Maybe we need to do recursive combat here as well. You don't need to insert Let's try this So it wasn't a member Okay, this needs to be an or No, oops. That's the wrong thing. No, no, no, it was correct, right? So I think it's hitting this case. Oh, no, I didn't do anything Otherwise this rounds cars must be in a new configuration the players begin the round by each drawing of the upper guard of that If both players have at least as many cards remaining in a deck as a value the card that is true The winner of the ground the term playing a new count from cursive combat As in regular combat then tucks. Yeah Cheering around if both players have at least as many cards in their own decks as another the cars They just till the winner of the round is pretty quick cursing into a sub game Yeah, okay the sub game each player creates a new deck by making a copy of the next cards in the deck. Yes During the sub game the game that triggered it is on hold and completely unaffected No cards removed from players decks to form within sub game Play one round the through card that checking the sub game would be copies of the next three cards in their deck Okay Right, so we don't have to do we don't shouldn't do rez here Okay, so if it if it was completely finished we do TS, but I think here It's not modified, right So then we need to see, you know, what was the condition Who won so we never actually use this so it's gonna be an hint This is a win for zero. There's a win for one If yeah, so this should be a winner from one zero Kicks, okay, if we recurse so case recursive combat set dot empty D1 S D2 S of a so if it's zero then We keep going recursive combat rev Set to that insert a D And then let's just right here Where I continue, okay, let's just do like this prev so we insert D into prev and so so Once the first one wins, right? If it's the one however Then it's gonna be this Okay So here we're gonna say Zero and one Okay, this should be actually we have to have this speed, you know in Zero yes, it's gonna be one Yes, this is gonna be Zero D Now Here we're just gonna ignore the return value. However, if it is like a Because we want to find it So you want one at the way at the look at the final end. Let's say trace show Trace prev Important debug dot trace that we never hit the prev So it's actually the first one here So D1 is doesn't equal to seek link D1 s and D2 is it as an equal to seek link? Here's how the player one draws a three-card a player does as long as with a curved player One has at least three cards left and player two has at least seven cards left. Yes, okay, so Yeah And player two has at least seven cards left. Yeah, we're drawn. Yeah Okay Yeah, I make a guy so you do make a copy right because it's immutable Let's see how it the recursive combats play out. Let's see. Let's see. Let's see. Let's see what's happening Okay, so D1 so it's nine and this is not larger than nine. Yeah, okay if D1 is D2 Then I think we do here. Yeah, seven five six two four one ten eight nine three Ten five six two four one ten eight nine three. Okay, we got it. We got it for the test Now a get a winner And Let's see is it gonna be another get winner of zero As Whatever is going to be See it's gonna be two lists of as For one is going to be two lists of bs Now let's see Get a winner and now we're gonna say score And we're gonna remove with the traces 20 milliseconds. That's not bad Okay, let's run it Let's see how fast it is Yeah, we didn't remove that trace, right? This might take a while, right? I think we're not we're not doing anything clever here. We're not memoizing or anything, right? Let's see How about we We say How about we memoize here? memo so case So we run get so Now i've got import maps data.map as map Gotta import qualify data.map as map Okay, and now we say here, you know If a case, you know d map dot Just i just zero It's going to be air zero wins where p1 wins equals this and p2 wins p2 win p1 wins Just one is p2 wins So if it's not there then We have to run it like memoized, right? memo and then we say here p1 wins the insert. Okay, and then we say here uh map.insert map.insert so it's key value and then map, right? It's going to be Like this it's going to be memo and the key is going to be It's going to be d And then this is a value, right? So But let's actually not look at let's look at the sub game So let's say the sub game here is actually going to be the key We're going to be inserting and this is going to be d1, ds, d2, ds Oh, it's wrong here. It is that there's another missing bracket And this is nothing it's not noting nothing Uh p2 wins p1 wins So memo Prev memo memo Prev memo, let's replace this with Sub sub and here we look up Sub okay Uh, yeah, so this one doesn't care and then oh this one here memo and This is just memo And here it says That's that autocorrect thing Now map.insert uh, it's a key. Yeah Yeah, yeah, yeah, yeah Okay, let's see Yeah, and this needs to be An empty map map.empty And then we don't have to actually Yeah, so we look up memo look on sub in memo, right? Okay, I think this will work. I think it's like otherwise We're always playing the sub games again and again super often But I think if we can like memo, it's memoize it this time It should be a bit faster, right? This is not at all running fast It's not good Oh sheet Why did I do this wrong? This should be like this give it a couple of minutes, right? Let's start it back. Let's give it five more minutes. See what happens Stand up a bit. Give me a second. Okay, so memoization is uh It's not enough here apparently Let's see. Let's try to look into it. It's been running quite long. Uh, so Apparently we need another approach here. We don't actually need this information here Maybe we should be returning the memoized from all the subs. I think that's the issue Uh, why is there a beep? Oh, yeah Five minutes run out makes sense I was like, oh shit. Is that my fire alarm? Damn. Okay. Let's see I think we need to return the memoize things out So here we are going to say Okay, uh memo So here we don't modify the memo Because we don't know the initial state, right? Here we say memo memo, okay, so here We do case recursive set empty memo. Okay p2 wins Okay, so what is that? So I think we don't care about so the m prime it's going to be here and m prime is going to be here and this is going to be Wins m new deck It's going to be here Right Let's just say m prime m here I'm turning into memo. We insert into m And here we have yeah, you don't care And we say uh p1 wins and right m prime just zero is p1 wins m prime It's going to be So if it's in every four then we don't change anything. We didn't do actually any computation So when are we When so when are we returning? When do we actually return anything? Uh, okay, we return it here at the end of it, right? Or maybe like this So then it kind of returns the memoize thing up, right? Now it says to So p1 wins here memo p1 wins memo. So we already insert sub into the memo Maybe you should just be during the Dammit Memoization doesn't even work for the base case, right? Okay, does this just not work even for the test input? What did I have before I memoize it? It's bad, right? If it doesn't even work that's like, oh Hey again, sir. See we we changed it and then it didn't work now. We're We're still trying to make it fast It's not good, right? Let's see it again Okay, this works. So what do I want to avoid? I want to avoid So let's see Okay, if if d is a member of prev. Okay, then zero d case swap the So we can we can also look, you know, if we've Did we have we seen that the Like a second one will win here and that could be good Is that still work for our test? Okay, good We can also give this prev. Okay, this prev is now we're gonna because this is this is a deck of cards with smaller Stuff finish, right? Okay, that'll be okay. So here we turn to the correct thing Okay, let's see charge my watch Let's see Let's see if this works on the output Is it gonna be like constantly swapping or something? It's like that's is that the thing here? Oh It's not the thing Okay, let's see I mean so like recursive combat like that sounds like we're just supposed to memoize and that should be fast but now we've tried that and That didn't really work I mean, there's gotta be some shortcut, but I'm just not seeing the shortcut, right? It's not at all Yeah, it's taking very long. Um Let's take a break. Let's just stop the stream take a little break See if this finishes Because you know, I I I'm looking at the problem, right and I'm not really seeing If there's a like a shortcut here I mean we're already doing like we did memoization that that didn't work Anyone have any ideas? Let's try try memoizing again, but yeah, I think the swap D thing that's dangerous Too dangerous Let's just have that case here, right? Okay, so we just look at look it up in the memo Uh, yeah, because this is just gonna be a demap the memo Let's first of all see if it works on a test input, right? Okay, it works here So here's actually where I find out where which one of Which one of it ends up being? And it just doesn't take any short time. Okay Maybe this map of deck set of decks and map of decks. Maybe that's just so slow Can I like hashes? Hashes sequence somehow Okay, I like hashes sequence Yeah, I think it's very likely that it's the it's the Set operations there are taking a lot of time Let's see All right, so the memoization is definitely helping It's just not enough, right? I think after this I can always Say that Zero wins, right? All right, let's give it 10 more minutes, but You know, I'm I'm not I don't I don't have any ideas. You know, I'm just a lot of ideas on how to We've memoized it, you know and Every complex problem. So it's a very hard for us to Do anything else and just kind of simulate it like I can't really see how we can analyze anything here Uh, so yeah, I I don't know. Let me check I mean we're doing memoization. We're using data.sequence. So we have efficient list operations I don't see we I don't see how we can push the performance of this part So Yeah, let's uh Can merge this part. All right, so Let's see So we can't we can't up the performance on this part, right? That's kind of yeah We're using data.sequence. So these are gonna be fast We are You know, we're using okay. We're doing set decks and map decks Which is gonna be a bit slow, but I I don't think it's gonna be that slow You know, I think it's gonna be I think it's gonna be okay And I haven't figured out any like shortcut. Does anyone Have any ideas of a shortcut here because like it's a very complex problem, right? It's like a very complex game and it seems It seems complicated, you know, and like the way you cheat usually in functional programming is that you memorize, right? But we've already memorized and it it's not enough To help us do this, right? So I mean, it looks like a copy of the next card. I mean, but you know, we and we do it correctly for the Example We do get this 291 here Um, but I don't see how we can speed it up By using like analysis, right? So we don't do repeat of games, you know, that's good We don't um Yeah What else is what we might be doing We don't check if we're like if we if we end up in the same situation again, we we don't We don't run it again, right? Shoot So what are we doing here? So this is like a a version of Mert sort or something Uh, let's see 756241 1093 Uh No, I mean, it's not sorted in any way, right? Anyone have any ideas How am I gonna end this in like five minutes? Because it's just gonna be running right and that's not Very fun to watch We're running for like five six minutes now. Uh, it's too much Yeah, I don't know. I don't know what to do I'll uh, I think I'll just pause here And you know, we'll I'll let this run. We'll see if it finishes And then I'll update you next stream But uh, or you know, I'll see if I get any ideas. So it's gonna be a part two, I guess The stream anyway, thanks for tuning in. Sorry about uh, not finishing Sadly, it's Not always enough to just memorize and use efficient data structures. So That's how it is and Yeah, I hope you all tune in again. Uh, I think I might stream tomorrow at six I'm not 100 sure and then I'll be off for a couple of days um Because you know, it's Christmas I have some soon Christmas parties to attend I'm gonna go in some Christmas walks Masks and everything it's gonna be gonna be fine. Well, you know We'll see we'll see if this ever finishes All right, thanks a lot for tuning in And uh, catch you all next time All right. Bye. Bye