Hi everyone, Joe for jaspyscasebreaks.com here with a 2020 prism football sell-o-pack break We're gonna do the break first and at the end of the break. We're gonna give away six spots in That stiff arm football mixer part of a big promo tonight check out the details on jaspyscasebreaks.com if you're watching live So first off big thanks everybody for taking the risk on this There are the teams right here all 32 are in let's do the break first Let's roll it randomized four and a six ten times for names and teams one two three and ten Four and a six ten times for the teams and ten All right. Here's the first half of the list right here Adam with the chargers and bangles in this pack Bennett with the Dolphins. So could there be some surprises in a little retail pack We've seen it happen before And there's the other half of the list Let's alphabetize by team and let's just print and rip green Joe Namath Nice little color match there Darian snobbins. All right. Nothing too crazy there. What about? About the red white and blue big rookie big rookie Big rookie big rookie big rookie Marlon Davidson I was hoping for a quarterback no offense to Marlon Davidson, but that's all right the whole point of this is Who is gonna win those mixer spots? Let's flip back here. Let's grab everybody's names again New dice new list And let's roll and randomize it five and a six eleven times top six after eleven. Good luck one Three and eleven and final time Apologies to Marlon David. I mean yes in stature. He's he's a big rookie Sorry Marlon, but we're kind of looking for for quarterbacks All right, so top six so from oh close, but no cigar mark that spot always sucks But big thanks everybody for taking the risk on this. I appreciate it Thank you So sad times for this group, but happier times much happy times. Oh Mark you're in that's good. I don't feel so bad anymore marks and marks happy happy times for Alan Adam Sean Sean and Bennett happy times for the top six Congrats. I'm Joe. I'll see you for the break Jasper's case breaks calm


A few weeks ago, I decided to upload a video every week, every Tuesday, less of like a health and wellness, life is no yoga, Vitamix partner related type of work thing, but more of just like an artifact, something to leave behind. Something that you can watch down the road or today or whenever, something that'll help you navigate this world. And I love the rhythm of this. I love the need to sit down and do it every week and it's not for everyone, it's just for you. It's more of art, it's not for work. It isn't to make money, it is just for the sake of putting something out there for having something that you can find hopefully when you need it the most.  Things that are urgent and important, things like the drawers need to be child-proofed again. Plates are breaking and it's urgent. I need to push our cookbook project forward, it's urgent. For our day job, customers need replies, urgently. Faucet is broken, we need to order a new one. We need to order more Kid B12 vitamins. I really need to make a video about 1K30. And part of this should be expected. I published a massive video last week about our visit or about inside Vitamix headquarters and it was perfect. I hate to say but like it was an A plus the opening, to the ending, to the flow, to the little ads we put in the middle, to the tone, just such a good video. And it's hard to follow that up. So I'm gonna do three things today. One is publish this video and this is just something. It's not going to outdo the video, I just published but it's something. Two, I'm gonna go get those things done that are pulling me away, that are gonna relieve some of the pain, some of the stress later this evening that need to get done that once they're done they will unlock my creativity and allow me to actually get into a flow again. One last thing to worry about, low hanging fruit, build up some momentum. I'm just gonna go do those things even though they may not feel that important they clearly are very important. And three because laughter is truly the best medicine better than food and water and sleep. Here's Judah, thanks for watching. I'll see you next week. Hold on. I don't want to go back. I've got a lot of things to tell you. Okay. All�


So I've got a little bit of experience with the dynamics there and I serve as chief scientist for a company called Valtech and we have an office here with around 600 people and we do agile offshore development and I've helped evolve and create that and I've lived here and I've worked on the other side of the fence as well working with clients who are working with offshore service providers and so forth. So I've kind of worked several sides of this fence If you want to go deeper into this, we have a whole chapter in our book that describes many of the experiments that apply in this domain and we want to get more concrete and there's often an intersection between multi-sites and offshore as well and so we find the tips in that chapter These have been based upon our experiences with respect to nation Let's start now you've some people have questions in their hands and Some of those people were born in the month of January And please hold up your hand if you were born in the month of January All right, let's take your question I'm going to branch for a moment and make a comment that Murray Bovendick has also mentioned and I think is a theme in lean thinking There's no such thing as best practices in domains like R&B It frees the whole idea incorrectly at least in English best means best Which means that there's nothing better And so if you set up a culture with the best practices group and the list of best practices And that immediately freezes you from the idea of continuous improvement and Challenging the status quo right or thinking that in this context of vinyl don't write or since talked about this for many years as well That in different contexts different practices are appropriate So I urge you to expunge from your vocabulary and mindset the idea of best practices I'm quite sure that in repeatable domains like Flying an airplane or a heart surgery there are currently best practices which are relatively context-independent But in young good domains like ours and domains with lots of variability that are highly context-dependent There's no such thing as a best practice Now what was your question again? Please ask your question again I'll just get out of the written words practices for better understanding For collaboration between on-site and offshore team Okay so


Life, death, defiance, a brand new university. Where's your good boy with the puppy? Hello, my people, my name is Meachem. Welcome to the Score Channel. Today I am your dean of tinyness. We're gonna be looking at some very tiny universities today. I know that when it comes to university, we tend to think bigger is better, like we do with a lot of things. Size doesn't matter, people. It's how you use it. And that's the truth with these universities today. They might be tiny, but they know how to use it. But start with puppies. Who's your good boy? Who's your good boy with the puppy? You're the best boy. What if you could major in puppies? Bergen University of K9 Studies is a tiny university located in, of course, California, where you can study one major and one major only. K9 Studies. In fact, this university requires you to get a puppy when you start there. I'm not making this up.  I wonder if you get lower grades if you don't pick up your dog. Have one professor who is the professor for the whole university. And even though it is an accredited legitimate program, it's very specific. Like you either come here because you love dogs and you wanna work with dogs the rest of your life or you just don't come here.  Let me introduce you to one of the most exclusive small colleges in the United States, Harvey Mudd College. This small private college in California only has about 900 undergraduates. It's one of the most expensive universities in the United States. But it also is one of the most valuable because graduates from Harvey Mudd make a ton of money.  But like Harvey Mudd College, freaking expensive, but you also make a ton of money. It's actually ranked as the second most valuable degree on pay scale, which takes a look at your earnings throughout life versus how much you spend on university. And it's literally right up there with MIT. It takes dough to make bread, man. All right guys, I got some bad news.  Happens eventually. Every good book means an ending. Death might make a lot of people sad, but it does make one group particularly happy. And that's the graduates of the Cincinnati College of Mortuary Sciences.  So you might as well make some money when people are dying.   You don't wanna be that guy. Now they have less than 100 students at any given time at this college because I mean, how many people really wanna work with dead bodies the rest of their life?  Maybe you don't wanna be in the business of handling freshly dead corpses. Like maybe you wanna handle them after the mortuary has done its thing.  That sounds like a funeral home. And if you wanna be a director of a funeral home, you can go to the Mid-America College of Funeral Services. Again, just like some of the other colleges on this list, they only have one major which is a Bachelor of Science in Funeral Services. I didn't realize that you really needed to get certified to run a funeral home, but it turns out that there are a lot of rules actually for running a funeral home. You don't just get to put a dead body in your living room and then tell people to come on over. I tried that, it wasn't good. All right, I think we've talked enough about death. Let's move on to life. Life University in Atlanta is basically the exact opposite of the last two universities. Life University focuses on wellness and health programs. They started out as a university that only taught people how to become chiropractors. Now they have a lot of different degrees related to human biology, nutrition, dietary studies, all sorts of stuff to help you be a better version of yourself, you know? Really become like the person that you're meant to be, man. And also, curiously, Life University has a really good athletics program which I guess makes sense, because if everybody who goes there is studying healthy topics, it makes sense that they would be taking good care of themselves and they would be good athletes. If you're an athlete who wants to learn about wellness and nutrition and sports medicine or anything like that, check out Life University in Atlanta. I made this list with a simple rule. You had to have less than 1,000 undergraduate students. Life University had 957, they just made it in. But how about a university with zero students? Yes, we're talking about a brand new university that is opening its doors very soon, the new U University. I, for one, am very curious about this. New U University is going to be located right in downtown Washington, D.C., literally just around the corner from the White House and Washington Monument and the whole National Mall. Like, they have an incredible location in an amazing city and they're gonna be one of the cheapest options for students. They're only gonna charge students $15,000 a year. And that's not even the craziest part. You're gonna graduate in three years. It's the first university in the United States to ever openly encourage students to graduate in three years. New U University's trick to getting you to graduate in three years is to extend the length of their semesters which allows their courses to accumulate an extra credit and when you add up those extra credits over three years you literally can eliminate two semesters and graduate sooner. Now that is awesome. New U University is literally promising a full bachelor's degree program for $45,000 which in the United States is extremely difficult to do unless you get like a really good in-state tuition deal maybe from one of the universities that I talked about in the previous Dean's List. You know, you could check that out too. I really wanna go see New U University at New U. If you're watching this, hit me up.  Next time I'm in D.C. I'm going, we're doing a university episode. Has to happen. I am fascinated whenever a new university hits the streets and I wanna learn more about these guys. It's kinda difficult to like pick universities for this list but when you see a cool name, you go with it and I saw Defiance University and I said, I have questions. Turns out this university is connected to Batman. Batman, Batman didn't go to Defiance but the thing is Defiance is named after a fort. Fort Defiance, okay? And the guy that ran the fort, his last name was Wayne. All right, think about it. One of the creators of Batman, Bill Finger. Yeah, Finger, that guy. He cited this dude Wayne, Matt Anthony Wayne as an inspiration for Batman. Bruce Wayne. So maybe if you go to Defiance, you'll be like Batman. I have nothing more to say about this university other than it has a cool name and there's a relationship to Batman. Let's move on. One of the reasons I like to highlight small universities is that they can do certain things really well. I mean if all you do is focus on one thing like Milwaukee School of Engineering, you get good at that one thing. And that is totally true of the Compass College of Film and Media. Compass College is located in Grand Rapids, Michigan where there happens to be an annual film festival, one of the bigger ones in the country. Students at Compass College get to practice making films in a nice city that supports filmmaking and then exhibit their works to a film festival which I think is pretty cool because you could study film in a lot of other places and maybe never get the opportunity to show your work to an audience. So even though it's a small college, in a small town, you've got a lot of opportunities. Here's a university that is tiny that you have definitely heard of. It's Juilliard. Juilliard's technically a conservatory but like it counts. They admit degrees, degrees or degrees regardless of where you get them as long as they're accredited, which these are. It counts. Juilliard is known to be the best place to study drama. Many famous actors like Adam Driver have come from Juilliard. It's also got a great program for music and other kinds of arts. So if you're into arts, performing arts especially, Juilliard is obviously one of the best places you can go. But of course it's also extremely difficult to get into Juilliard. I mean, it's almost Harvard-like with a 7.6% acceptance rate. I mean, Juilliard even takes their eliteness to another level. They don't go, oh, graduating class of 2022. Nah, nah, nah. They number them as groups, okay? Kylo Ren graduated in group 38, for example. And a single group might only have about 100 students which definitely makes them belong on this list. I mean, this is a tiny university for a very specific purpose but it has produced some very amazing people. But it's not as exclusive as the last university on our list. Okay, my people, come closer. Closer. Closer! They're listening, man. They're watching me, man. They're listening, man. You gotta watch out. We're not even supposed to be talking about this university, man. And IU, the National Intelligence University. It's literally a spy school. Not making this up. The National Intelligence University is a university dedicated to teaching people how to become spies, okay? I mean, look at the cover of the website, the picture. It's like the spy versus spy outlines. This is clearly a spy school. And I wanna go but I can't because I am not an active military member, okay? And I don't have a recommendation from one of my superiors that says I should go to the NIU. That's how you get in. You gotta be active military and one of your superiors has to be like, yeah, Mishim's cool. You can trust him. He's not gonna leak national secrets to Russia. Go ahead and send him to NIU. He would make a great spy. Side note, my dad said I would make a great spy because for years I pretended to follow a particular religion when I didn't really believe it. I was so good at convincing everyone that I was a true believer that everyone was shocked when I announced that I didn't actually feel that way. And it got me thinking, maybe I would be a good spy. I mean, do you even know if my name is Mishim? Have you thought about that? Why am I in Peru? Think about it. Wikipedia says that NIU has 700 students but I think they're pumping the numbers, guys. I mean, let's think about it, right? First of all, it's a spy school. Why would they put the exact number on Wikipedia? You think they would do that? Of course not. Why do you put it there? You want the Chinese and the Ruskies and the North Koreans? You want them to think that you have a lot of spies so you put a pretty chunky number like 700 spies in the spy school so the opponents are like, oh dang, man, they got a lot of spies. They got a lot of spies. But in reality, I bet you it's a way smaller number because think about it, man. You got 700 spies, that's too many spies. Somebody's gonna leak some information. I saw the Bourne Trilogy. They didn't have that many spies in Treadstone. All right, I think I've said enough though. I gotta get out of here before I hear a knock on the door. Bye.


What's up everybody Jason for jazzy's case brace calm 2021 panini flawless basketball just sold out This is a two blocks case break pick a team's number 13 plus six hundred dollars in break credit as a giveaway guys So again guys at the end of the break any customer that bought in straight up a team straight up We'll have an opportunity to win no random number blocks counts So we'll randomize only the customer names that bought in straight up teams and the top two names will win $300 each in break credit Remember guys just as we said in the past if we pull a card such as like the LeBron triple Ovalman something of that type We'll discuss the options with all the partial owners Of the card if applicable remember Jasper's doesn't do any majority rules If the customers choose they want to sell it and take all the shares if they want to randomize it We'll leave it up to them So good luck. All right, here you go guys. So there's a customer name straight up. There's a RMBs Here we go guys. Good luck. Here's a Dallas and Brooklyn RMB Here's the Nick's Milwaukee, Chicago RMB is the rest of them for O.K.C. Phoenix Washington Portland, Utah and Indiana Hello guys, what up Sam? Missed me. All right guys. I think it was like seven for seven and like 28 points in the first quarter in threes It was wild. Oh, how about this to start us off a little LBJ LeBron James 16 out of 20 three color patch And that's the best besides a local man. You can do That of course is game-worn used material Lakers going to Gretch. That's actually probably a really big hit Would not be surprised Next thing we got is for the Super Sonic's David Thompson That is 15 out of 15 Seattle Super Sonic's would be going to local in the city Thunder 5 That's Gretch we have ourselves a mark price for the calves 19 out of 25 for Cleveland Going to Gretch We have a precious a Chua draft gem signatures 25 out of 25 Miami Heat Going to Gretch We have a Jamal Murray nice one out of five patch autograph nice three-color patch as well That is for the Denver Nuggets Steven with that one Inks a little faded right there, but We have a Tim Hardaway three out of ten Golden State Warriors going to Sean Mattick. Yeah mark price So that would NBA Jams All right, David Robinson the Admiral team USA going to the San Antonio Spurs Adam Kelly and last one here is A Cole Anthony three out of 15 Orlando magic going to Wayne. All right guys. Let's go. Let's go with the diamond card here And we got Jason Tatum to start us off six out of 20. That is for David and the Boston Celtics What we got here? What we got here? James Wiseman for the Warriors five out of ten That's a gold rookie flawless signatures And that is going to Sean Mattick in the Golden State Wars. There's the first flawless briefcase in the books Let's go with the next one Come on logo man. Just need one Just need one logo man So that same wise been in a case with a nice at man, okay That's good. Good to hear Usually they do kind of pair them up. So All we got Tobias Harris 13 out of 15 76ers 76ers is going to Gretchen. We have Dave Cohen's for the Celtics six out of 15 It's going to David B We have for the sixers Elton brand momentous autographs. That's eight out of 25 76ers going straight up to Gretchen For the Dallas Mavericks Josh Green Five out of 15 spot five for Dallas Going to Gretch We have Lori marketing for the Chicago Bulls six out of ten three color patch Chicago Bulls Six going to Gretchen. We have Kevin McHale 18 out of 25 draft a gems Jason kid for Dallas 13 out of 15 Dallas 3 it's going to Andrew O'Neill the last one here is Hakeem the dream 11 out of 15 for the Houston Rockets going to David B Very nice.  Oh, that looks like potentially one-on-one colors And it is Harrison Barnes for the Sacramento Kings 101 diamond and the diamond is extremely bigger than the rally ones when it's one of ones Sacramento Kings Gretchen. There you go Actually had like a 30 40.9 day after Kings blew it up. All right, here we go signature prime materials There's a basketball nine out of 25 Anthony Edwards two color patch and on-card autograph Sean Maddock had the T-wolves and the Golden State Warriors Taking a big risk and hitting on both James Weissman and now Anthony Edwards Very nice Beautiful That was a great briefcase actually Very nice Sean. Congratulations, man and There you go guys Appreciate it guys. So now let's quickly see we can give back to 600 bucks back to some people that bought in straight up This is a nice case of that LeBron James patches probably actually sells really well So let's copy and paste the whole list, but I'm gonna delete all the R&Bs right now All right, let's roll the dice and remember top to get 300 bucks back roll it. It is a six and a one seven times Good luck one two three four five six and Seven the final time Boom seven seven Gretchen and David congratulations. So Gretchen I'll send you 300 bucks David. I'll send you $300 Appreciate it guys Jaspies case breaks calm


In this session, we are only going to discuss one-dimensional arrays. The matrices we will discuss in the subsequent session. I hope all of you have seen the videos related to arrays. So this is the first question. Very straightforward. Some philosophical comments about the use of arrays. So which is more appropriate for the use of arrays? A, to deal with large number of values. B, to get some of two numbers. C, to get average of three numbers. D, none of these. Everybody written down the answer? Anybody still thinking? Here is a conventional description of an array, not C++ description. Please remember that this is deliberately put to tell you that there could be some confusion when you read a mathematical textbook and try to implement it in C++. In maths, traditionally we represent an array by just saying A is equal to set of values. In fact, something similar is borrowed for initialization of arrays in C++ as well. Except there is a fundamental difference. That the array references are usually first element, second element, third element. A1, A2, A3, A4. So just as a recap, it is indicated that A1 is 5, so you know exactly what weight reference means. What is the sum of A2 plus A4 plus A6? Straight forward question just to pay attention to the indexes that are there. Everybody solved it? Simple problem. The following properties are true for arrays. There could be more than one. A, to store a large number of similar values. B, collection of adjacent memory locations. C, an index could be used to refer to an individual element. D, all of these. Choose an appropriate answer for arrays in C++. First statement says we must declare an array's name and size. And two, the size could be float. The choice A says only one is true. Choice B says only two is true. Choice C says both are true. Choice D says both are false. Again, those who have watched the video would know the answer. It's a straight forward answer. Everybody done? Anybody still thinking? Raise your hand. Ah, you have not watched the video? You have not watched the video? If you have not watched the video, you can't answer simple questions. You have to watch the video before coming to the classroom. Now you have to guess. Aitins are very good at that. So apply your mind and guess. We go to the next question. Now this is a C++ array declaration. An array A of size 5 is declared with these initial values. What will be the value corresponding to A in square brackets? 2 star 10 minus 3 star 6. Note the question. What is the value corresponding to A indexed by such an expression? Choices are A is 2, B is 3, C is 6, D none other. This requires a very small paper calculation and application of mind to locate what is being indicated. All done? Here is a code segment lifted straight from a lecture. It says that you have to assume marks is an array of type int which has been defined earlier. Not only define, let's say n values have been read into it. So the value of n and n elements of the marks array have been already taken in as input. This code segment starts after that. Read the code segment and comment on what does A represent. The array is marks array. A is declared as an int. A represents choices are A, standard deviation, B, average, C, sum, D, none other. Again a straight forward question. Everybody has answered. Anybody still thinking? Our friend there. I think this at least you should be able to guess if you read the left hand side properly. You are able to? Great. See following are practical aspects of programming with related to arrays of course. So A, check if the value given by user is out of bound. B, display error message if value is out of bound. C, write explanatory commands. D, none of these. I am surprised that my friend is not asking questions because you should have lots of confusion now. Isn't it? What exactly we are talking about? I use this opportunity to tell you that not only this question but there will be several questions which could be worded in such a fashion that the precise meaning of alternative terms and sentences may not be very clear. It is deliberately being done here to test how you think generically. Important that you be able to think generically. More important, anyone who thinks that the choice of sentences, phrases in any text, forget the quizzes, could have been better and could make the whole thing more meaningful, should take the initiative, write it down and send it on a discussion session or by any means. Everybody has answered this? We will post brief answers and explanations later on the course homepage. So what was your answer for this? Have all papers still been corrected? Otherwise our friend there who was guessing will correct all the answers and then submit. Please submit all the slips. So let's go back to this quiz. Suppose everybody agrees that the answer is A. Alright, I modify this question and I say I want to find the average of 3000 numbers A and C. So if the number is 3000 and you have to find the average of 3000 numbers, you need an array? Okay, suppose this was 2000, would you need an array? To find the sum, we have discussed this earlier. We can find the sum of 2000, 20,000 numbers. We need only one location for reading a new number. We read a number, accumulate it into sum. Then we read another number in the same location the previous number has been accounted for. We don't need to maintain it. So if you just have to find the sum of 20,000 numbers, you don't need an array. You need an array if you wish to do something else later in your program with the same values which you have read. That is when you require an array. You don't require an array to find the sum of two numbers or 2000 numbers or 20,000. Similarly, you don't require an array to find the average of 20,000. You just need a count in addition to the sum which you have calculated. Would you need an array if you have to find the standard deviation? Well, yes and no. You can do some clever programming and accumulate something else, not one but multiple things, by which you can actually find the standard deviation without storing all 20,000. However, that is not done. Generally when you have to do one, two, three, four different things with all values which you read, then you need to keep them in an array. This is very simple. What is the answer? So it is 9 plus 34 plus 43. Is that correct? All of these. Only one is true. Why should size not be float? Because you are declaring the size in integer numbers. But why can't C plus plus come? Suppose I write in a, in bracket 5.7. Why can't it take it as 5 or 6? If I had defined the language to permit this, it would have been possible. But the language definition does not permit it. So it is not a question of what you and I feel about it. It is how C plus plus behaves. So please remember, C plus plus behavior is explicitly and precisely stated and it says that the size must be declared as an integer value. Nothing else permitted. Can I say in my program, int n is equal to 25 and then int array say n. Can I say that? Yes, no. Technically it is incorrect. When you say array n, the value of n will be known to the program only when it is executing. The initialization of the variable n is done, which is an instruction to the compiler. But as per the language specification, the value that you write describing the size has to be a constant, an integer constant. Try this out when you get a chance. Declare a constant int and then try to use it. So what is this? This is evaluated as 10 into 220 minus 6 into 318. So the index reference becomes 2. This is a0, this is a1 and this is a2. So if the index is 2, a2 refers to the value 6. No? What is the answer? Now our friend here says it is not C. So what is the logic? Yeah. You think it is not C, right? Yeah. No, no, but what was your answer? It is important for all of us to know and find. So his answer was 5 and that is because he thinks this is the element which is indicated. Many people make that mistake. The reference to these elements in C++ is as follows. This is a of 0, this is a of 1, this is a of 2, this is a of 3 and this is a of 4. Although the array has 5 elements, in C++ they are referred to by index values 0, 1, 2, 3, 4. A5 in fact is out of bounds. So that is the importance of putting that earlier quiz which talks about the mathematical array. That is how you would write. But in C++ this is the interpretive. In fact, many a times in solving actual problems we do make this mistake. We sort of in our mind assume that the array reference is from 1 to n. It is not true. It is 0 to n minus 1. Here what is the value it is found out? A is average. Because clearly this sum is dividing by n. My friend here has a doubt, a very correct doubt. I have defined int A. A is being assigned the value sum by n. His observation is if sum may be integer, n may be integer, but the division of sum by n need not be integer. As you know in fact the average of marks need not be an integer value. This is where you start making assumptions. So if you were to write an analysis of this program, you will say that in your opinion the author of this program seems to have made the following assumptions. Number one, the array marks is of type n. Number two, i and n appear to have been assumed to have been declared as int. This is the assumption. And number three, the assumption appears to be that whatever be the input value of marks, the sum appears to be such a nice value that it is exactly divisible by n. Then and only then this program calculates average. Otherwise it will calculate a close approximation to the average. Now this all has to be written in English as commentary on this question or such thing. It is important to understand this. When you write your programs, what you are writing is probably very clear to you and hopefully to the C++ compiler. But it is often not very clear to others. And that is the reason why we have comments. That is the reason why comments have to be written properly in every program. What is the answer to this question? A, B, C, D, E, F. What is going on? Shouldn't you do each one of these things? Is there anything which is stated here which is less important than the others? Now suppose you have to choose only one. Which one will you choose? Okay. This answer reflects the standard dilemma that we all face. Three important things have to be done. Ordinarily we believe all three must be done. But in real life, suppose I have to prioritize and somebody says choose one. This is called force ranking. There are three equally important things in front of you. But you are forced to rank these three to say this is first priority, this is second priority, this is third priority. Please understand that such questions cannot have unique answers. They do not have unique answers. Somebody will say this is important, somebody will say this is important, somebody will say this is important. From that individual's perspective, that answer is correct. This is just additional inputs. Please understand programming is a very precise art. But real life is not very precise. And translating your issues in your mind for a problem into a very precise program is not a very easy thing. That is where you need what is known as problem analysis or program design. Anyway, let us quickly look at some of these things. Everybody knows that if an array is declared, array is allocated consecutive locations in the memory. This fact is very, very important. If you declare variables, even if you declare them one after another, like in i, j, k, there is no guarantee that i, j and k will occupy consecutive locations. There is no guarantee at all. Compiler does not require that. However, if you have declared an array, it is guaranteed that all elements of the array will be allocated consecutive memory locations. Later when we study pointers, this fact is exploited. In fact, it is this fact which permits compiler to implement array references very easily using what you call index expression. So what it does is it just goes through this, keeps in memory this base address. And whenever you give an index, that index multiplied by 4 because each coefficient is 4 bytes, it can find out where the next address is. That is how arrays are implemented. This program will know. I would just like to emphasize one point. There are umpteen different ways in which you could write iterative solutions to scan all elements of an array. Typically, whenever you have to scan all elements, there are n elements, let us say. Then we remember that the first element of the array is referred to by index 0. It's called 0th element. This is the answer to your question or your doubt. The last element is referred to by n minus 1. And that is why it is suggested that anytime I have to scan all elements of an array, then it is best to use the simplest structure for count equal to 0, count less than n, count plus plus, or count equal to count less. So don't have any bells and whistles inside your false statement if the main objective is to scan the array. If you have any additional computation as a good programming practice, it is best that it is done outside. Unless your computations are such that they must be included in the body of the false statement. In the class, you have seen a variety of ways in which you can write false statements. All those ways are valid. There are some very interesting and clever ways, but try to keep your program simple when it comes to scanning array elements. That's the purpose of showing this problem. Now this is the first problem that we'll solve today. The sieve of Eratosthenes. How many of you have seen this concept? One, two, three, many. All right. For those of you who are not aware of this, this is a famous algorithm to find all the prime numbers in the range 2 to n. Prime numbers are numbers which are divisible only by one and themselves. Now this fact is used in this sieve to solve the problem. You start with a list of consecutive integers. Imagine in your mind you have integers 2, 3, 4, 5, 6, 7, 8, 9, 10, 100,000, whatever. You have got a set of numbers. You put them into this sieve. There are some numbers which will drop out. What remains should be prime numbers. Assume that all these elements are unmarked. That means they are inside the sieve. They are not dropped down. If you mark an element, that element goes away. That's the assumption. So you don't consider that element anymore. Why are we not including one? Because everything is divided by one. So there is no point of considering one as a factor. Start with 2. The process is like this. Mark the lowest unmarked element. Say p. To begin with p will be 2. Because 2 will be the lowest element which is unmarked. Okay. Now look at all numbers greater than 2. Up to whatever range you have. Say 100, 200, 5000 more. And each number you divide by 2. To find out if there is any remainder other than 0. You can use a simple model operation. So if you are looking for p, you are not looking at p, but you are looking at all other numbers which are divisible by p. And if any number is divisible by p, you mark that fellow as useless. Okay. The final process is about marking numbers which are a factor of some previously. If there are no numbers which are a factor of p, they remain. All others get marked. Repeat these steps 2 and 3 unless all elements are marked. So you have considered p now. Now you consider the next unmarked number. The next unmarked number is obviously a prime because it was not divisible by p. And p is the lowest number anyway. So if you have 2, the next number will be 3. Now you are looking at 3. Actually you are looking at all subsequent numbers which are not yet marked. And if amongst them you have any divisible. So all elements which are left in the list. So it is as if you have a sieve, chhani, and you have all these numbers. And whenever you mark a number, it sort of falls down. So whatever remains are your prime numbers. Very simple and efficient algorithm. Here is an example. Suppose n is equal to 14. And therefore you want to find out all prime numbers between 2 and 14, both inclusive. So this is the sort of original input list. 2, 3, 4, 5, 6, 7, 8, 9, 10, up to 14. The output list produced by the program should be 2, 3, 5, 7, 11, 13. Because these are the prime numbers. So let's do the analysis of the problem and some program design. Is it necessary to have an array of all natural numbers which we want to examine whether they are primes or not? What is the meaning of marking and unmarking? Here is this algorithm. You mark 2 and remove 4, 6, 8, 10, 12, 14. Now the list says 2, 3, 5, 7, 9, 11, 13. The others are marked. The next unmarked thing is 3. So now you mark 3 and remove 9 because 9 is the only number which has 3 as effect. Now the list says this. We examine 5. None of them is divisible 5. 7, none of them is divisible by 7. 11, none of them is divisible by 11. So this remains. And at the end, there shall be the numbers which are unmarked. All others should be marked. How do we implement this algorithm? So here is the suggestion. I can solve this problem in two different ways, by the way. I call this the removed array. The removed array is also of size 100. So it has elements 0, 1, 2, 3, 4, up to 9. In this array, I wish to keep a 0 if the corresponding number is removed. I keep the number 1 if the corresponding number is not removed. Where is the corresponding number? I am not keeping that number anywhere in an array because that number will, I know, is either 2, 3, 4, 5, 6, 7, 8, 9, 10. In fact, I would like to set up an outer iteration which examines every number. And it is that number with respect to which you have to take a call. So that number is here. I will put all of these as zeros. I know that I need not start with 0 or 1 to examine the natural numbers. I have to examine natural numbers so I might have an iteration as indicated here. First, I am writing a code to mark all elements with 0. Code snippet 1 will contain what? If I have this array int removed 100, can I simply write, is this adequate? If in my declaration itself I put 0 as the initial value, come on, you have seen the slides. This is at least one place where I have indicated how you can actually initialize the array. Let me give another example. Look at this declaration. In array 4, 7 minus 5, 12, 16, is it a correct declaration? What will it do? It will declare an array called a-r-r. Its size is 4. Since there are 4 values given, these 4 will be assigned to 0th, 1st, 2nd and 3rd element respective. This is the initialization for the whole array where you give a set of values. Now imagine this. I do only this. I declare an array of size 4, but I give only 2 values. First of all, is it valid or invalid? It is valid. Second, what will it do? It will assign only the first 2 values to the first 2 elements of the array. So array 0 will be 7, array 1 will be minus 5. The remaining elements, the C++ language does not say anything about it. There are many people who make an assumption that all remaining elements are set to 0. There may be some implementations which may do it, but C++ language definition does not require it. Consequently, this will mean what? An array of 100 elements is declared, a-0 is set to 0. What is a-1, a-2, a-3, a-4, a-100? God and that particular implementation of the compiler, these 2 people only know. You and I don't know. So you cannot make any assumptions. That is why you are required to write a code here, code snippet 1. Let us write down this code snippet 1. The declaration is here. Int, removed, 100. There are simple code segments who will not waste too much time, but I want everybody to write it on a piece of paper. It's exactly 2 or 3 lines of code. Please state this as a question. So no discussion at this juncture. Each one of you has to write the code snippet 1. That means in this place, the int removed array that you have has to be initialized to 0. It's an absolutely trivial operation. I don't know why people are taking it. All are done. Anybody who has not written these 2 lines of code could tears go around and check it because I found yesterday that most people there enjoying the discussions but not writing anything. Every one of you should write 2, 3, 5, 10 lines of code that is required to initialize an array to value 0. All done? Anybody who has not been able to get it, please raise your hands. Ah, our friend. So you have a fundamental problem with the notion of an array itself. Right? The problem is very simple. There is an array declared with just 100 elements. You have to set all elements to 0. So there is nothing philosophical about it. I am surprised that people have doubts even about this simple operation. I don't think you have watched the... All right, let me ask one question. How many of you followed my advice that you shall not watch a video without a notebook and a pen or pencil in your hand? You did that or you did not do it? You did it. Very few people. Now this is not on. This serious business, just like in a classroom you take notes. You have to do that. Here is a simple code. For int i equal to 0, i less than 100, i plus plus. Please remember what I said some time ago. If you have to deal with an array and scan all the elements of an array, then the best bet is to write a simple for loop and the only statement inside here is set height element to 0. Is this not clear to everyone? All right. So now let us go to the next part. Now this is where I would like people to take five minutes doing this work individually. Five minutes given to you to do this work individually. Check if i is not removed. Then remove all multiples of i except i. Let me just explain this question a bit more. Please look at this carefully. Those of you who are still struggling, what exactly we are trying to do. Please remember that, unlike in the original problem description, we do not have a set of numbers stored anywhere. So on the sieve the numbers are only hypothetical. The way we are implementing it is, as far as we are concerned, the sieve is represented by the index of this array. Inside this array I have all zeroes. That means none of them are removed. If any one of these numbers becomes minus one, then that number is treated to be removed. Now note that if this is the outer iteration that has been written, what I need to find out is, for each i, look at all subsequent numbers. So i is equal to two, for example. This is what you are looking at. You have to leave two alone. Two will not be removed because it's a prime number you are starting with. Now you have to look at all subsequent numbers. How do you look at subsequent numbers? Because the array, you have to set up another iteration inside and you look at all numbers more than two. So you look at three, four, five, six, seven, eight, nine, ten. What you have to examine? Any number that you look at, whether it is divisible by two or not, is three divisible by two? No. Is four divisible by two? Yes. Then you have to go to the removed array and the fourth element you have to replace by minus one. You look at integer five. Is it divisible? No. Six. Is it divisible? Yes. So look at the sixth element and change this zero to minus one. So what you are doing is you are maintaining a kind of flag inside this array. If there is a minus one, then the number corresponding to the index is removed. This way you will remove all the index numbers and then when you come back to the outer iteration, I will become three and then you will start looking at three and then likewise we will examine all numbers larger than three. If they are divisible by three, you convert the corresponding value in the removed array to minus one. This is the logic. All right. So how many of you have done this already? One, two, three. Oh, large number. Can one of my TAs get one of the answer books please? Others are still doing it, so please complete it. No, no, keep the answer books with you. I would like them to be exchanged with others. All right. Complete this problem in five minutes. All right. I request a proper discussion to happen now. Please swap your notebooks with your neighbors and check each other's answers. If two neighbors haven't got the answer, please discuss it with the third neighbor or with your TA. Was it one or minus one? What was it supposed to be? I forgot. Anyways, non-hero. So this works. You sure it will work? When you come out, you would have all them marked. Okay, it's very similar to this, but that's okay. I think this will work. Let me see if any other... Any solution that you have... You got it? Sir, there is a follow-up here. I to Christian Cutler. And I to Christian Cutler. Then... I to Christian Cutler. Why are you doing this? Why are you doing this again? Why are you doing this again? Sir, there is a follow-up here. No, no, sir. Look, there are two different snippets. One is zero in the first one. The loop should end here. It's over. Now you will have to write this loop again. For I... Yes, don't confuse these two things. Don't do that. First, you have to define it. Then initialize it in zero. Then do it later. So take this out from here. Yes. J equal to 2. You have to see its next number. If I get 5, then what will you see from J? What will you see from 5? I or I plus 1? I or I plus 1? If I get I, then I is divisible by J. Why? Why not start? Yeah, good. Rewrite that problem. What are you trying to do? Sir, I am just... ... ... ... ... ... But here both numbers are increasing by one by one. You are not implementing that algorithm. Imagine I is equal to 2. Okay.  So this is not correct. The loop and you are changing this. That loop is stated. For int I equal to 2, I less than 100, I plus plus is fixed. You can't change it. Now you write whatever else you want to write. Now you write whatever else you want to write. So internally there should be a loop from J equal to I plus 1 to 100. No. What it? No, no, no. You have to do exactly what it says. Not your own algorithm. Then I am... ... ... But that loop it has been stated. For int I equal to 2, I less than 100, I plus plus. This is written. Now inside that you write whatever you want to do. This is done. This is done already. This is not connected with the second part. This part is code snippet 1. You are writing code snippet 2. After this I am doing that for int J3. Then I am saying J divided by... I, correct. Then if this is 0, then remove I. Not I, J. You are examining J. And then the idea is correct. But this is done. No. It's correct. I am looking for some... ...better solution. I have got so many correct solutions. I want the discussion to stop now. I know that some of you were in the midst of... ...getting close to understanding the problem. But I think I have understood the way the discussion is going on. It's going in the right direction. But I would like to remind you of two things. First of all... ...many people seem to be confused because... ...they presumed that there would be an array containing all the numbers... ...which they have to examine. So for example, most of you are... ...trying to see... ...where do I have 2, 3, 4, 5, etc. ...as value. They think this should be the array of numbers. And it is in this array that they are examining an individual number. Many of you expected that, right? You have an array of numbers 2, 3, 4, 5, 6, 7, 8, 100... ...in which you are examining the number. This is not the way this particular solution proceeds. There is no list of numbers. There is no list of numbers in this problem. While this way would be certainly one of the ways to solve the problem... ...and as I keep saying again and again... ...there is no unique way to solve a problem in general. There could be hundreds of different ways... ...hundreds of different algorithms. The same algorithm implemented in five different ways. The particular question that has been asked... ...expects you to solve this problem by implementing the algorithm... ...in a particular way. In that particular way, there is no such array. The numbers that you have to examine are all hypothetical... ...in your mind. They are not stored anywhere. So when you write the four iterations... ...when you write an iteration... ...this iteration as of now... ...has nothing to do with the array removed or any array or any such thing. You are examining the value i. And how are you examining the value i? You are examining whether the numbers subsequent to i... ...are divisible by i or not. That's all you are examining. So forget the array for the time being. There is a number i which is initially two. Subsequently it will become three, then it will become four, etc. You are examining whether the number two... ...divides any other number subsequent to it. Now if you have to examine all numbers subsequent to i... ...and to find out whether they are divided by two or not... ...at the minimum, you need an iteration... ...which will examine all numbers... ...starting with i plus one at least... ...because you are examining numbers subsequent to i. If i is two, you are examining three, four, five. If i is four, you are examining five, six, seven. So to examine all numbers in sequence... ...you have to set up another iteration. Which let's say says for j equal to i plus one... ...j less than hundred, j plus one. Now when you come here... ...at this juncture you have two numbers. One, the i which is the main number which you are examining. And second, one of the subsequent numbers j... ...if that j is divisible by i... ...then you have to remove j. If the j is not divisible by i, you are not to remove. How do you find out whether the j is divisible by i or not? Good. If j is divisible by i, j modulo i will be zero. In which case j must be removed from my list. Now that removal list is an array. The removal list is an array. j is not stored physically inside that array. But the jth element of that array has been mark zero... ...which means it was not removed. If j has to be removed, technically I have to tick inside that array... ...put it as minus one, something. So whatever you have to say, that's it. Nothing else is required. The inner loop will examine all numbers greater than i. And if any number is divisible by i... ...it will set that number as element in the removed array to minus one. When I complete this iteration, I will go to the next i here. There are variations possible. This is one solution given by Lavish which does exactly the same thing. He examines if removed i is not equal to minus one. That means if a number is not removed earlier... ...this is not required because you are examining these numbers. This is required because if a number is already a factor of something... ...which has been determined, I need not look at that i again at all. In fact that would have been removed. For j equal to i plus one to less than hundred, j plus plus... ...Lavish examines every j whether it is divisible by i. That means he simply puts removed j equal to minus. When he goes back, looks at the next integer. The next integer number will be three. The third element would still not be removed in that array. So three is a valid thing. But when he goes to four, he need not examine anything beyond four... ...because all of them would have been marked anyway. You will be doing double work. So this check is useful. Here is another more fruitful or slightly more efficient algorithm. The outer iteration is same as all of us have done. i equal to two i less than hundred i plus plus. If removed i equals zero. That means the number is not yet removed. Then you need to examine all subsequent numbers. But look at which subsequent numbers the person is examining. So Raunach is setting j equal to i. So examine that number itself. Is he examining that number? No. Just wait to see what he is examining. He is setting up a variable j. He starts with j equal to i. He lets j increment till... ...there is a problem here. I think you meant j less than hundred by i, right? Here is Raunach. Yeah, goof up. The c plus plus compiler is not as pardonable as human beings are. Notice very clearly what he is examining. He is simply removing all i star j. So will this algorithm work? What Raunach says is for every j he show examines, i star j is set to minus one. He is terminating at hundred by i because beyond that j into i will be beyond hundred. Notice what he is trying to do. Let me try to explain it in a slightly simplistic way. I don't know how many of you did that, but when we were young we had to mug up multiplication tables and recite them. Three ones are three, three twos are six, three threes are nine, three fours are twelve. Have any one of you done that? Most of you have done that. What he is doing is he is making c plus plus compiler recite the multiplication table of i. Suppose the number is five. So five fives are twenty-five, five six are thirty, five sevens are thirty-five, five eights are forty. He is reciting the multiplication table of five and anything which multiplies, which means that number has a factor. So therefore that number is being set as minus one. This is slightly more efficient in the earlier algorithm where you are examining every number anyway. But the numbers which are only multiples of i need to be removed. So he is doing that. There is only one problem here. You can make it slightly more efficient because there are some numbers. For example for five and j equal to six, five into six is thirty, thirty would be removed. But thirty would have been removed when he would have examined two. Thirty would have been removed when he would have examined three. So he is hammering it down by removing a number which has already been removed. Of course the only easier way to do that is if that number is not removed. So examine whether this is zero and then only reset it. So infinitely the cost of comparison and cost of assignment are not much different. So there is no harm in doing. There could be many variations, yes. Any observations? How will we include the extra condition that if it's already assigned not to check the value? That's what I said. It's not easy to do that. You can include the extra condition by saying if removed i star j is equal equal zero, then only you do that. Otherwise in some earlier iteration it would have been done. However to doing an extra check on every element it is better to reset that element again to minus. That is why there is not much cost. Alright, that understood? So one suggestion is the condition you can put in the for loop itself. j less than 100 by i and removed i star j equal equal zero. There is a discussion going on on whether this algorithm can be made more efficient and we concluded that while we can examine the value being assigned it is already minus one, we need not do that. The point I was making is the cost of examining whether that value is minus one and putting a minus one in it are exactly similar and it does not matter whether you examine it inside the loop or as a part of the loop condition because that will also be executed or comparison will be forced every time any which. There is a question to write the code to output all the primes. Now please note here again the primes are not stored anywhere in an array which is the conception many of you had. So this output is not a straightforward operation of printing some elements of an array. You have to actually examine the removed array and whatever is not removed the index value has to be printed which is the prime number. I need to make an important announcement and at least introduce the next problem. So we will not discuss this problem now but I want you to think about this problem later. This problem introduces a new structure called a queue. All of you are familiar with queues like a queue for buses, queue for train tickets, etc., etc. Imagine the queue is simulated by a C++ program in which an array is used to simulate the queue. The beginning of the array is head of queue, the end of the array is tail of queue. To simulate a real-life queue, suppose I go to a bus stand, I will stand at the end of the queue. So there is an operation defined called N queue which inserts an element at the end of the queue, end of the array. There is a corresponding operation called D queue. D queue will remove an element from the array, a person gets into the bus, that person physically goes out. So D queue operation is a costly operation because the 0th element has to be removed when you do D queue and all other elements have to be pushed up because the array must start always with the 0th element. The N queue operation is simple.  That plus 1 will be the next position and the next element which is queued has to go there. So as I said D queue is a deslection operation. The ends of the queue are called front and rear ends and insertion happens at the rear and deletion happens at the front end. Here is an example. So initially queue is empty. Assume that N queue and D queue are functions written by you. N queue takes an integer parameter. This is the element which has to be inserted in the queue. So when I say N queue 4, 4 gets into the array, into the 0th element of the array because the queue was empty so far. Next element is N queue 5. So 5 gets inserted next. Then come 6, 6 gets inserted. Now imagine that the next operation is D queue. D queue does not require any parameter. D queue means whatever is the head of the element, take that fellow out and put him into the bus. So throw him out. So delete that element. So when you delete the first element, 4, 5 and 6 have to be pushed up. Now that is a cost. You have to push up everything. At the end of the queue, this will be the status. Again N queue 8 and 9 will see 8 and 9 coming here at the end and D queue again will make 6, 8 and 9. This exactly behaves like a bus queue. Some people keep going out into the bus. Some people keep coming in. At any point in time the queue will increase in length, reduce in length. There will be always some queue. All the original inhabitants of queue might have long ago gone. That is how a queue works. The question is consider the queue 4, 6, 7, 8, 9, 10. Perform the following operation in the queue and check your answers with your TA. Now this is, you just noted down. We will display it on the website. You can use that. Question 2 is what is the minimum number of operations needed to remove 12 out of the queue? 12 was something which was inserted at the very end. You can look at it more carefully. This requires examination. So here eventually I would expect you to write two functions N queue and D queue. But assuming that such functions have been written, what would be the state of the queue is what you have to comment upon. Thank you.


Why is personal branding important? It's so important because it's how people are gonna remember you and your cause and what you stood for and your message for all time beyond your lifetime of mine. Look at somebody who built a personal brand in such a significant way that it's lasted beyond 2,000 years at this point. Jesus Christ, whether you follow him or not, whether you follow his walk or not, he's built a personal brand. Whether he decided to do that or not, that was, he just did it. He was in the flow of getting the message delivered and downloaded and through him to the point that other people turned that into scripture that millions of people follow every day now. He also created discipleships so that those ambassadors would go and spread the good word. He's built a brand, a personal brand that has lasted beyond 2,000 years and I challenge you to do the same.


Hello, and a very happy Christmas from the Scottish Parliament. Christmas time is a time to reflect on the year gone by, and it's also an opportunity for some of us to spend some time with our family and with our friends. In the days leading up to Christmas, the Parliament's members and staff come together with their neighbours, the residents, school children and workers of the local holiday community to celebrate the Christmas season in a very traditional way with our annual carol concert in the Garden Lobby. I hope that wherever you are, whatever your plans, you have a peaceful Christmas and a very happy new year.