 Hello, everyone. Welcome to FICA on India 2021 and PileyD's India Experience Sharing session. For this session, we have Anushi Maheshwari with us. So Anushi is currently a software engineer at Google, and is working on some of the exciting components of databases. Besides this, she has also contributed to the top-notch Google-branded competitive programming competitions. Code Jam, Code Jam, IO, and Tikstart in her 20% at Google. She is also a senior interviewer and is often engaged in collaborative interviews with scholars, improvising their tech and interview skills. Before joining Google, she was pursuing a bachelor's in electronics and communications and developed a knack for coding from competitive programming. Travelling the road from a beginner to a reputed coder and a non-CAC and a tire cook or the student, she has tackled the most that you all have got to ask of. And here is a first to help all of us to understand how to ease problem solving from a non-CS engineer's perspective. Welcome, Anushi. Over to you. You can share your screen. Thanks, Hukanya. Thanks for the introduction. Let me share my screen, and let's just get started. So, Hukanya has already given a very good introduction. But today, since I'll be talking about problem solving, or as it is known, popularly known as competitive coding, so let me just give you a brief about before my work and before starting my work in Google. I was doing my EC from a diet to college, and I didn't have that much knowledge of computer science at that time. But then I came across Saish like co-chef, and it interested me a lot, and then my journey began. So I've done competitive programming in my college, so today I'll be helping you out in various myths and various questions and how you can ease it as well. All right, so let's get started. So before we go deep into the topic, the very basic questions and for all the images here, what is competitive coding or problem solving? So it's a science of solving problems in a time and resource-challenged environment. You are given a limited time, and you have certain problems, so you have to solve that in that given time frame. The problems here are well-defined. That is, they are not open-ended. So the problem solutions are well-known in advance, and it's more of a sports coding. So you do it, you do coding for sports, right? Okay, so that's about what it is, and but another very basic question, and which is like a must-question for any field you start, you should definitely ask yourself why you should do it, right? So the very first point is, it improves your cognitive ability. Like as the other name that's problem solving suggests, it improves you to solve problems, how you can solve any real-life problem, how you should tackle that problem. It will help you improve your cognitive ability, and it will go in the long term, right? Besides that, the competitive coding helps you improve your knowledge of data structures and algorithms. And DSA is one of the fundamental subjects of computer science. Believe me, you can learn any framework, mobile framework, iOS or web or backend, whatever it goes. DSA, OS, TBMS, these are like co-fundamental subjects. If you have a strong grasp over them, you can learn any of them, any of the frameworks, right? The list doesn't end here, and this is the most interesting point and various people enter into this field for the interview preparation. So if you are good into competitive coding, you have covered 70% of your interview preparation already because as a fresher, most of the interviews are focused on DSA, and it will go in the long term to help you crack fang interviews, right? And last but not the least, this is one of the major points and you should definitely enjoy what you are doing. So I can say once you are comfortable into a field, it's very much a habitual, like you will get habitual to that green thing and it will drive you, it will drive that force in you. So this is a really fun part and you will enjoy a lot and you will get a lot of swag as well if you do really well in the field. Okay, so another question is most CSC students have especially in college days, even if they are amateur or even if they are intermediate into competitive programming, they have like what they should do and how they should manage their time between competitive coding and software development. So here's my key on it. So if you are starting out, if you are starting out in the computer science, you don't have much of the knowledge, then start with competitive coding because the prerequisites here are pretty much less and you can, you will get a good grasp over the core fundamental subject TSA and you don't need a lot of to know before, right? But like not everyone is on the same page, right? So some people will love development more and they will say, they are not that in competitive coding. So my take on it is like don't do competitive coding if you are really into software development and really like that, you are getting a lot of amazing perks of development. So don't just come to this field just because of interview preparation. And the reason is because competitive coding is a way above interview preparation. Lead code or geeks for geeks for example is a way to go and it's much focused on interview preparation. So don't come from software development to competitive coding just for interview preparation. But if you are starting out, then start out with this field, I would say, because it will help you in software development later as well. So enough of these basic questions. Let's see how you can is into competitive coding and let's have a roadmap for this. So the very first basic thing is like learning the coding, right? And if you are already into your first year or done it, you would already know basic coding, but let's see what does basic coding means and what do I mean here, right? So the basic coding actually covers a lot of things like if you see from a different perspective, but here I would say just get comfortable with loops, arrays and strings. Just get comfortable with questions about these things, these topics and it's just enough. Don't really go deep. For example, if you will say like before coming into CP before being competitive coding, you should learn loops or learn some other constructs, right? Learn some other libraries. So I would say don't really go deep because you don't know what is really useful. And for example, oops, let's say oops. Oops is a very fundamental thing again, but it's not that useful into competitive coding. So don't go deep before even knowing what is required. Just learn the basic things and enter into the field. The more you will have in the prerequisites, the more likely you will quit the field. So just keep it brief and enter as soon as possible, right? And the third point again, like same thing, but the learning will happen on the fly. The things, the libraries that you don't know, of course the libraries are needed, but the libraries that you don't know will happen and when you will learn by reading others code, by solving more questions, you will learn them. So don't make it a prerequisites. Instead, learn on the fly, okay? So this is about the coding, but let's see which language you should choose and this is again a very popular question in competitive coding on which language you should choose. So the most two, the two most popular languages as a choice is C++ and Java. So C++ has pros of being fast, it's really fastest and other than C, C++ has the libraries as well. So C++ is fastest, it has libraries and it's concise as well. So you'd have to write very short code to make something work. But in Java, Java is two times slower than C++, but it's not that concise as compared to C++. But the pros here with Java is that it's useful in development, general development, for example, if you do Android development or you do backend, then Java would be useful to you. C++ is useful if you are into something performance or something low level, okay? So this is like C++ and Java, but let's see Python. So Python has all of these things, library support is really great, the conciseness is even better than C++ and it's also useful in development almost all of these, especially in ML and things like that. But the problem is it's very much lower, five X lower. The problem with competitive coding is that there are certain questions and those questions have time limits. For example, if a question is there and it's a one second time limit in C++, then it would be usually two second in Java and in five second in Python, right? Ideally it should be like that. But sometimes your C++ solution will pass and Python won't. So there's a problem and that's why I would say if you are starting out and you don't really know languages then go with C++ because a lot of developers into competitive coding are into C++. But if you already know Java then you don't need to quit Java for learning C++. You can do that because there are some code programmers in Java as well. Once you are into this, you are like intermediate player then learn Python as well because some library support like BigInt is not that great in C++ and Java. So once you have learned Python, like the combo of C++ and Python for me goes really well. Okay, so the second point into our roadmap is jump into the sites. Jump into the popular sites directly. And why I say jump into popular sites because if you are into your college and there are some people who will advise you to lead code or do geeks for geeks first and or do some hacker-ranked practice problems, don't jump into code chef, code forces because they are too hard. But my take on it is once you are done with your prerequisites, jump into it because the more, again, the more you will increase your preparation, the less likely it's that you will quit because you are not getting rewards or you don't really know which particular area is there which you should invest in. Okay, so if you are just starting out, you don't really have a good grasp over DSA. For example, if you are second year students, you would not even have studied basic data structures, right? Then start out with code chef long challenges. Long challenges are like have spent a day. So it would be good for you because you have ample time. I'll talk about that challenges part as well later. So code chef and hacker earth is the way to go for a beginners. If you are intermediate into a field, then jump into code forces at Coder and top Coder. They are really great. They have very good problem sets. And the problem is that they host only short contest. They don't host long contest. Or if they host like it is based on a team. So yeah, these are the popular sites. Jump into it directly. Don't really say we are practicing problems. Jump into it, okay. You will really learn doing by doing it. There are other things as well. For example, Project Euler. Project Euler helps you improve your mathematics ability. So it's Project Euler is like maths plus computer science. So it will improve your maths part. And there are OJs as well. For example, U-Cycle. U-Cycle is a very well designed training program for USA, IOI training olympians like for that. It's well, it's well written. And if you are starting out, then it's very good for you to start from here because it will go step by step. And there are the OJs as well. Like Tim Morskatt is much younger. They have a lot of problems and you can solve them as well in your practice rate, okay. So the third thing is like practice and don't miss contest, okay. So again, some people don't do contests. They just practice problems. But like contests play a very, very important role in your preparation, in your, in you to ace the speed. And we will see like there are various other advantages. The next part of this presentation will completely see how a contest will help you identify which areas you should improve. So my take on attempting to contest is you should definitely attempt, even if you are able to solve just one question. Definitely attempt it, okay. But there are again two types of contests as I told before. There's like long contest and there's short contest. So long contest has like a tough days to spend. For example, culture long challenge goes for 10 days. And if you're a beginner, then definitely start with this. Like long contest is a must for you. Try to do this because you will have ample time to learn any new algorithm and then apply it. You can practice problems and then go to a contest mission as well, right. But in short contests, usually you don't have enough time to learn on your algorithm and like go from scratch. But it's for intermediate and advanced participants. It actually improves your thinking ability. It helps you iterate faster. Even in debugging or in iterating through various approaches. So if you want to like go over some international contests like ICPC or HECCUP or some things like that, like Code Jam, short contest will be useful to you. So yeah, start from long contest, but yeah, once you've gotten to intermediate level, then switch to short contest as well. Okay, so the last point in our roadmap is absorbing. Absorbing is actually a mistake. It's not something you should do. It's a mistake that most people don't do, but it's really so common and it's so important that I have listed this as a part of the roadmap. So make sure that you are absorbing, but before we, let's see what absorbing means, right. So absorbing is let's say that you are attempting a contest, Code Forces contest, let's say. And there are five problems for you. And you were able to do two of those in that two hours duration. And you read the third problem, but you couldn't solve it. Be it a wrong answer, be it a time limit exceeded word, right. So you were not able to solve it. Now, absorbing is solving the third question that you have read, right. You have read it, it's very close to your level, but you were not able to solve it. So there's some gap between your knowledge and that question. And that question will make sure that you are actually doing something that you don't know, right. Because a lot of people, what they do is like they will take some section, for example, let's say a course of easy section or beginner section. They will do all the problems here. It won't really help it, it won't really help you improve. And this is, you will be at your same level. You won't see improvement in your performance. So make sure that you are absorbing. Well, when I was in my college, I wasn't absorbing at that time. And I wasted months into this. I was not improving. So then I realized, okay, that's the problem is that I'm solving the same kind of questions I know. And I'm just wasting my time. The main thing is solving those questions that I don't know and learning something new. So make sure that the questions that you have read, you definitely do that. But don't do those questions that are way above your level. For example, the same code for this contest, you gave, you were able to solve two questions. And you are directly, after the contest, you are directly jumping into a fifth one in two years. You won't really understand it because it's like a combo of some algorithms. You don't know, like you don't know both the algorithms and it's a combo, it's some specialized break over that. So don't jump into very high level questions because you won't really understand it. Jump into it if you have time, but make sure that you are solving the next question. That's very, very important. Okay. So apart from that, the PR group. PR group is one of the very important things which is helpful for you for acing your preparation. So if you have your college, then in your college, if you have any coding clubs, then definitely join it because in your college, coding clubs, there would be other participants, you will be solving the contest. You will be doing your contest in a group. And after the contest is over, you can discuss the problems, you can discuss the solution, the various approaches that you guys did. So college coding clubs is, if you have it, then it's really well, definitely join it. But if you are from a dietary college and you don't have a college club, then don't get disappointed because, so like one of the best thing about a CS is that everything is online. And once you are into this field, you can make online friends as well. People at your level or slightly below your level will be helpful in your, it will be a further discussion, right? And they will be like your online friends. After the contest, you can discuss the problems with them as well. So PR group either be online friends or be at college coding clubs is definitely great because it helps you to gamify this picture, gamify the complete contest, right? Okay, besides that, like besides discussing solutions and learning, the core forces gym contest is another thing that you can do as a PR group because it has, like it goes as a team and the challenges as well, like for example, ICPC or you have to participate as a team, although college team, but yes. So if you have a team or a PR group, then it is going to definitely help. Okay, so before we end this, one very important thing is resources. Where you should learn about competitive coding, right? So the resources that I followed were, I read a book on competitive programming three by Steven Felix. I've read most part of it. And I can say for sure that this is a very, very great book of the, like of competitive coding. And if you really want to, if you want to excel, then this could be one way, you can read this book. It's great. It will help you know certain algorithms that you don't know. Okay. And there's the site, cpengotherms.com. It also lists on major algorithms. And the site, this site has very concise way of writing down an algorithm approach, linking the practice problems that you should solve to understand that thing and complexity and best handling. The best or in the concise is implementation of that particular algorithm. So this is a very good site that you can follow. Other than these sites, there are like top code articles so and core forces and core chef blocks. Not everything is covered into all of these articles and blocks, but the most part is, for example, like they are famous for one particular thing. For example, top code is really famous for C++ STL. And top code is also famous for graph flows, right? And core forces and core chef blocks, they have very great community. So let's say that you want to know centrality composition, right? And you just search centrality composition into core chef, core forces search. There would be some person who would have already seen, already posted, what are the best resources to learn this particular topic? And they will like participants, the advanced participants will list on some of the resources that they followed. So you can search into these blocks to find out the other resources. There are various resources actually that they are scattered all over across the web. For example, Quira has also has one of the great topic of like this heavily decomposition pattern which I guess. So there are these things are scattered, but you can find them in these blocks. Okay, so yeah, that's from my side and thank you for running this presentation and let me know if you have any questions. Thank you Anushi. Thank you so much for this presentation. You can keep your slide on. I think we can take two or three questions. Anushi, do we have any questions? If there are any, please post it in the chat and I shall redirect to Anushi. So from Manav Sethi, we have one question. What is your opinion on the fact that competitive coding promotes kind of nonholistic view of looking at computer science? For example, students spend four years at just doing competitive coding. Okay, so my take on it is it's a person to person view, right? It depends you really want to go very deep into algorithms. You really want to crack, you really want to just focus on competitive coding for four years, but my advice is you should not. You should learn software development as well. So what I advise usually is start with competitive coding because it will improve your knowledge of language and DSA and then you should do software development and mostly you should do opens like in software development I suggest open source doing open source but there are participants on other pages as well. They say that they want to do well in ICPC and ICPC being a like international contest and there are various participants who have been doing coding, doing competitive coding from years, right? So to get a good rank there, definitely do you need to spend time? So it's person to person view, but if you are more into learning diversifying, then you should do competitive coding and then switch to development as well, okay? And if you want to excel into some international contest then you can spend more time with this. Thank you Anushri. Yes, there are, there will be more questions, but in case just an announcement if we are running out of time, feel free to join 2021 slash stage slash five on Zulip and Anushri would be available there. You can also interact with her there. Meanwhile, there's another question where the question was asked by someone else. Anonymous, so the question looks like what you would like to suggest for senior engineers having eight plus years of experience who works in multiple programming languages and system design, but need to refresh BS? Okay, so I would suggest don't jump into competitive coding because competitive coding is fall, if it's mostly falling if you want to really, so the long thing in that goes into competitive coding for example is ICPC and these contest, right? Because these are international contest, right? So if you're already into development into eight years then most likely what I think is you will be doing this for doing interview preparation and refreshing your memory for interview preparation, right? So my take on it is that you should not jump into competitive coding. Instead do lead code or geeks for geeks interview preparation and things, right? Because that will refresh your memory, that will refresh your algorithm and data social usages and that will be much more focused for your interview preparation and competitive coding is a way ahead of interview preparation, right? It's more of your investment into learning in algorithms, complex algorithms and it goes a great way. So, but I think if you are already into development because see development is the long term of your computer science, then if you're already into development find it very rewarding and then don't jump just into competitive coding for interview preparation. Do lead code in seed because it would be much more focused. Thank you Anushi. Anuprit to answer your questions where can you get the slides? Well, post all the sessions, post the conference, we'll post the slide on the 2021 slash states that's five stream on Zulip. So follow that and you shall get the slide. There's a question again, an anonymous question Anushi. Can you give a source on Java being twice lower than C++, is there a factual reference? There are references because Java handles a lot of errors and memory issues for these things. I can search for it, I need to find out the article and then I can give it. But for certainly like the time limits in most of the sites, is twice as given is for C++. Even if you see like, let's remove the competitive coding part, even if you see various low level things, for example, your camera image processing, then they do it in C++ and they have tried it, I got them same, I got them in Java and it was much lower than compared to C++ because of handling these things because C++ is very close to memory and CPU all of these things, that's why. Java handles a lot of these errors for you. Thank you Anushi. I'll take the last question before, probably you can just take one more question. Sure. So what if, I don't enjoy competitive coding but somewhat good at development, most companies in India are asked to solve critical coding problems in online test and interviews, how do I get a job? This is again an anonymous faster. Okay, yeah. So if you love software development, then I understand because there are a lot of people who don't really find this enjoyable competitive coding, then my take on it is to software development. Don't jump into something that you don't find enjoying, but as you said, most of the companies ask for these questions, then I would say then do lead code because lead code have those questions that have been asked before and they are much more similar and much more focused for interview preparation. Don't do competitive coding these contests and these would be, like these go in the other way. It's much more time-inviscable as compared to interview preparation. You can do lead code and get a good grasp of it and let's see the other part. So if you have a good profile into development as well, then companies do respect that. It's just that you should have a good profile, profile that could be represented because in competitive coding, for example, if you are doing code chef, code forces, then you have a profile, right? But in case of development, if you are just doing some personal project, then make sure that you have some online perspective, for example, get up, right? You have some profile there that shows that how hard you have worked over the year to do some project, right? Or do open source because open source is a great way, not just to learn development, but also to learn community, like how to interact with community, how to interact cross-site, how to deliver projects, something like that. So open source is another way of going into development, which helps you build your profile as well. Thank you. Thank you, Anushree.