Home

Introduction to Competitive Programming

Introduction: What is Competitive Programming? Competitive Programming is an exercise to level up your Programming and Data Structures & Algorithms skills via solving numerous real-world programming problems under certain crucial constraints including time limit, memory constraints, time & space complexity, etc. It is like a programmi...

Read more

Choosing a Programming Language for Competitive Programming

Introduction: Competitive programming requires efficient problem-solving skills and quick algorithmic implementations. While the choice of programming language largely depends on personal preference and familiarity, certain languages offer advantages over others in competitive programming due to their syntax simplicity, standard libraries, and ...

Read more

Time Complexity

Introduction to Time Complexity: An important part of competitive programming is learning the concepts of time constraints and complexities. Time Complexity refers to the estimated time an algorithm is going to take for complete execution for the given input. It can be said as a measure of efficiency of a program against the size of input or pa...

Read more

Loops

Introduction to Loops: A loop in programming is a control structure that repeats a block of code until a specified condition is met. It allows you to execute a certain piece of code repeatedly, saving you from having to write the same code multiple times. Loops are fundamental in programming and are used in various scenarios to automate repetit...

Read more

Arrays

Introduction to Arrays: Let’s understand the concept of arrays using an analogy. Consider a situation in which we have 20 students in a class and we have been asked to write a program that reads and prints the marks of all the 20 students. In this program, we will need 20 integer variables with different names. Now to read the values of these 2...

Read more

Strings

Introduction to Strings: The concept of strings in C++ provides us the facility to deal with the textual data in our programs. Strings can be understood as a collection of charachters in an Array. Difference Between C-style Strings and C++ Strings: C-style strings are arrays of characters terminated by a null character (‘\0’). They are just lik...

Read more

Sorting

Introduction to Sorting: A Sorting Algorithm is used to rearrange a given array or list of elements according to a comparison operator on the elements. Many efficient algorithms use sorting as a subroutine, because it is often easier to process data if the elements are in a sorted order. For example, the problem ”does an array contain two equ...

Read more

Linear Search

Introduction to Linear Search: Linear Search is a searching algorithm that starts at one end and goes through each element of a list until the desired element is found. Otherwise, the search continues until the end of the dataset. It is also known as sequential search. Basic Algorithm Given an Array A of n elements as $a_0, a_1, a_2, …, a...

Read more