 What's up guys make the code here today? I'm going to show you guys some really cool things that I learned Okay, so let's say you have this array of numbers like this And then you want to print out this array of numbers or a matrix of numbers, okay? So what is it? What do you do? Well, you just loop here and we'll start Normally you just loop there right and then you just print it out G at i dot size g plus plus And you just print out every single number, right? ij now the problem is that in This is a competitive programming. What you have to do is you have to print out Spaces between right and then a new line after each line So how would you do that? Well ideally what you would do here is you would do If you're at a new line, so you're at a new line here You're gonna print out a new line Otherwise you print out a space right, so if you're at the last last element here You're gonna print out a new line to go to the next line. Otherwise you print out a space Okay, so this is what you would do ideally and they would just print Ideally if you run this just print out every single number in a matrix or an array Like that, okay, but this is a really cool trick that you could do Okay, so what you could do is this is something I learned by reading other people's unreadable code Which is if you do this that and Then you do j is equal to G of i dot size and This would do the exact same thing Okay, and the reason why is here. I'll show you what I mean Hold up. Oh wait minus one Yeah, so this would do the exact same thing and the reason why is because here what it's doing is that This is checking if j is equal to the last element So it's checking if you're at the last element. So if you're at the last element, this is gonna return one Right, this is gonna return one and if you're not overturned zero So because this returns one if you look at this string the string is zero slash n right so if you look at if I look at What a pain explain to you guys what this means so this space slash n Right, so at the zeroth index it prints. There's a space Here and at the first index it's printing out a new line slash n so here when you're Checking at this point if j is equal to the last element What this is doing is that if you're reaching to the last element in your current array Right in your current last value here It's checking When you reach it, it's going to print this is gonna return one Right, and it's gonna return a new line. So it's gonna print out a new line here So it goes the next line and if you're not at the last element or last row it just prints a space So yeah, there's a cool trick. We guys enjoy this. You could use it sometimes. Yeah to avoid the if statement peace