Skip to main content

Points to keep in mind while choosing language for competitive programming

 

A programming language is a set of grammatical rules for instructing the computer to perform a specific task. Programming languages works as a medium through which we can communicate with the system and instruct the same. Competitive programming is solving coding problems using algorithm and data structure. The coders need to write the code under various constraints like memory limits, execution time, limit of coding, space, etc.

Competitive programming helps to enhance our logical and analytical skills, also, our algorithmic knowledge. It is a great additive to the CV.

The only thing you need to be careful about is choosing a programming language that the compiler/evaluator accepts. The majority evaluators will accept C/C++, Java and Python (unless if a problem is made for a particular language).

As a programmer, we can opt any language but we need to be conscious while choosing in order to make our program more efficient in terms of time and space consumption.

Points to remember while choosing language for competitive programming:

·        As a beginner, you can begin with Python. As python is easy to learn and syntax are user-friendly. Besides this, it provides highly built in modules, which makes it easier for programmer to code.

·        Another advantage of python is that, it provides the REPL support (Read-Eval-Print-Loop) which makes it more easier.

·        Compared to C/C++,JAVA, Python is slow.

·        C++ is considered the most effective language for competitive programming.it is used by highest number of users in world of competitive programming.

·        Major key factor in case of competitive programming is time and C++ codes take least Run-time, i.e. C++ codes are more faster than any other language. Due to C++ Predefined Containers & Standard Algorithms Present in Standard Template Library( also Known As STL ) and no other languages can beat it,  which makes short codes and simple, which are great lifeguard ,which will rescue you from unconquerable problems, saving lot of time of thinking and typing those algorithms

·        Java is a completely based on OOPS concept, i.e. it is Object Oriented Programming Language. It is the second highest popularly used programming language for competitive programming after C++/C

·        Java uses class (Big Integer class )which is used for performing mathematical computations on large integers quickly. It comes in extremely handy during the exception handling. It is also great for application building.

·        In Java, fetching input using Scanner class, many times, leads to a TLE (Time Limit Exceed) problem. Although it is a compiler based language like C/C++, but is relatively slower than them. Also, program codes in java are lengthier than C++and python.

In short we can say:

Easiest to code: Python

Most powerful: C++

Most likely to be useful in android applications: Java

Order of run-time: Python (Max) >Java >C++ >C

To conclude, every language has its own execs and cons, the most matter is the logical and analytical approach you take in order to solve a problem.

 

 

Comments

Popular posts from this blog

Pegasus Spyware: Flying Through The Air

 Hundreds of millions of people can't imagine life without their smartphones. Almost every aspect of their daily lives, from the most mundane to the most intimate, is within easy reach and hearing distance of their smartphones. Only few people realize that their phones may be used as surveillance devices, with someone hundreds of miles away secretly extracting their messages, photographs, and location while also activating their microphone and recording them in real time. Such capabilities are present in Pegasus, a spyware produced by NSO Group, an Israeli maker of mass surveillance weapons. What is Pegasus? Pegasus is a hacking software – or spyware – that is developed, marketed and licensed to governments around the world by the Israeli company NSO Group. It has the capability to infect billions of phones using either iOS or Android operating systems. The spyware is named after Pegasus, the white winged horse from Greek mythology. It is named so because it "flies through the...

8 TECH SUPPORT STORIES. A MUST READ!

MOVE THE MOUSE! I asked a user to move her mouse all the way to the right. They picked up the mouse physically and put it on the right side of her desk. RIGHT CLICK! I told the user to right click on the desktop to select properties. She replied that nothing was happening. I asked her again to do the same. She replied with the same answer. When I went to her desk, she had written the word CLICK on a paper on her desk. LAPTOP NOT WORKING! A user was once shouting at me that her laptop was not working even though she hit the keys and tried the touch pad. I run down to her, she shows her laptop still shouting that I wasn’t working properly and couldn’t do my job etc. I look at her laptop, switch it on, turn around and leave the room. OUTAGE PROBLEM! A user once asked if they could download “download the Internet” in case there was a power outage and they could still use it. COMPUTER WON’T TURN ON! Once, a user said that her computer won’t turn on. I asked her to check ...

HOW TO SEE INCOGNITO HISTORY AND DELETE IT

We have heard about private or incognito browsing. It’s the mode that doesn’t store anything in history. While it does store cookies, but are deleted after the session is exited. This mode is known as Incognito browsing in Google Chrome, Private Browsing in Mozilla Firefox, and InPrivate Browsing in Internet Explorer. Whatever we may want to call it, the mode works the same in all browsers. However, sometimes we might want to go back to a page that you previously opened. The question is – can you check your incognito history? Problem is, there is no easy way to go back to that page. So all are search queries we saw is effectively lost. Unless you can Google it up and it shows again. But if it’s not there on the first page of Google, it’s gone forever. But we can still get to know about the websites that have been browsed under the incognito mode. Yes, the private browsing mode has a loophole. You can see the browsing history of someone using incognito mode but only if you h...