Posts

Forget Efficiency and start solving easier problems

Sometimes, you may notice that many programmers solved many problems but they made very few submissions (they are geniuses!). At first, you may think that I should try to solve the problems as less try as possible. So, after solving a problem, you will not want to try it again with other algorithm (may be far far better than the previous algorithm you used to solve that problem) to update your rank in the rank lists. But my opinion is that if you think so you are in a wrong track. You should try other ways as in that and only that way you can know that which of the algorithms is better. Again in that way you will be able to know about various errors than can occur. If you don’t submit, you can’t know it. Perhaps a problem that you solved may be solved with less time in other way. So, my opinion is to try all the ways you know. In a word, if you are a beginner forget about efficiency. Find the easier problems.Those problems are called ADHOC problems. You can find the list of those prob

New practice session for all the programmers with me.

So guys sorry i had been missing around for a while due to academic pressure and now i promise that i will keep on updating the blog with exciting and interesting blog posts so all those who are interested to learn competitive programming from scratch can start with me.I will start posting the resources to learn the concept and some problems based on those topics.Good luck. I will  start the training from 5th june.

sorting algorithms explained part 2

Selection Sort Algorithm Selection sort algorithm starts by compairing first two elements of an array and swapping if necessary, i.e., if you want to sort the elements of array in ascending order and if the first element is greater than second then, you need to swap the elements but, if the first element is smaller than second, leave the elements as it is. Then, again first element and third element are compared and swapped if necessary. This process goes on until first and last element of an array is compared. This completes the first step of selection sort. If there are  n  elements to be sorted then, the process mentioned above should be repeated  n-1  times to get required result. But, for better performance, in second step, comparison starts from second element because after first step, the required number is automatically placed at the first (i.e, In case of sorting in ascending order, smallest element will be at first and in case of sorting in descending order, larges

Sorting algorithm explained part 1.

Introduction to Sorting Sorting is nothing but storage of data in sorted order, it can be in ascending or descending order. The term Sorting comes into picture with the term Searching. There are so many things in our real life that we need to search, like a particular record in database, roll numbers in merit list, a particular telephone number, any particular page in a book etc. Sorting  arranges data in a sequence which makes searching easier. Every record which is going to be sorted will contain one key. Based on the key the record will be sorted. For example, suppose we have a record of students, every such record will have the following data: Roll No. Name Age Class Here Student roll no. can be taken as key for sorting the records in ascending or descending order. Now suppose we have to search a Student with roll no. 15, we don't need to search the complete record we will simply search between the Students with roll no. 10 to 20. Sorting Efficiency: There are

How many questions, on an average basis, shall I solve daily, to become a top-level competitive programmer?

As many as you’ll manage to solve while practicing intensively instead of running for numbers. This question in fact make not too much sense. You don’t even give definition of “top-level competitive programmer”. I know people who say a coder with yellow rating is basically a stupid newbie. I know people saying that making into CF div1 means being a top-level contestant, an inspiration for everyone around. Which one fits better for your scale? You didn’t put any timetable - do you want to reach that level in a year, or two, or ten years?.. Number of problems that you solve isn’t the exact indicator of how productive you are, or how intense is your preparation, or how much new stuff you learned. There is some probability that you’ll use fixed number to motivate yourself: “I haven’t solved enough problems today, I should keep practicing instead of going to do something else”. But, on the other hand, there is decent probability that you’ll intentionally or unintentionally switch to

Is it possible to join ACM-ICPC with a team of 2 members only?

There must be three per team. If you have a team of only two, reach out to a third person at your university, even if their skill set is not up to your expectation. Then, train smart. In October 2016, we had an ICPC Alumni Meeting at Stanford, courtesy of Sutter Hills Ventures. It was a resounding success. One past ICPC World Finalist told of his floundering in school, seeing something about the ICPC, and joining a team of two. They accepted him only for the team to have enough members. He flourished n the team environment, where it is in everyone’s best interest for all to advance quickly. His F’s became A’s. His team advanced to the World Finals. He volunteered as a judge during a time of spectacular growth of his region. He became a trusted member of the ICPC family. He was recruited to a prominent position in Silicon Valley. He is doing well. He shared this story at the ICPC Alumni Meeting. He brought his young son who is a pistol. He knew that the ICPC family is exactly th

Should I quit competitive programming? I am not good at it, but I like it very much?

Think about the reasons you are doing it and make a decision correspondingly. You are doing it because of some benefits you are going to get once you’ll reach decent level? Think if it is worth it - maybe you don’t have other way, or maybe you can get these benefits by doing something else and investing smaller amount of time. Or maybe you simply don’t need them. Look how much you improved over time and scale it to get some approximation on time it will take you to reach the level you want/need. You are going to improve over time. Maybe you aren’t going to improve fast. Even if you can improve quickly - it will require investing great amount of time and effort. What do you need from competitive programming? Why are you doing it? You like it very much, right? This reason sounds good enough - but you have to consider everything carefully and weight it. Just imagine that you are doing some other fun (but possibly useless) activity instead; imagine saying “Should I quit playing compute