Ravi Ranjan has Published 148 Articles

C++ Program to Implement Merge Sort

Ravi Ranjan

Ravi Ranjan

Updated on 15-Apr-2025 15:26:32

46K+ Views

The merge sort technique is based on the divide and conquer technique. We divide the whole data set into smaller parts and merge them into a larger piece in sorted order. It is also very effective for worst cases because this algorithm has lower time complexity for worst cases too. ... Read More

C++ program to convert Fahrenheit to Celsius

Ravi Ranjan

Ravi Ranjan

Updated on 11-Apr-2025 17:17:03

4K+ Views

To convert fahrenheit to celsius, use a simple mathematical formula. In this article, we are going to discuss the conversion formula, a simple example, and an easy example code. We have been given a temperature in fahrenheit and our task is to convert the given temperature into celsius using C++. ... Read More

C++ Program to Find the GCD and LCM of n Numbers

Ravi Ranjan

Ravi Ranjan

Updated on 11-Apr-2025 17:15:30

4K+ Views

The gcd refers to 'Greatest Common Divisor', i.e. greatest common number which can divide all the given numbers. The lcm refers to the 'Least Common Multiple' i.e. the lowest common multiple of all the numbers. To find the gcd and lcm of n numbers in C++, we can use various ... Read More

C++ program to generate random number

Ravi Ranjan

Ravi Ranjan

Updated on 11-Apr-2025 17:14:54

4K+ Views

Random numbers are the numbers that are unpredictable and we do not use any pattern or algorithm for choosing them. They are used to bring randomness such as while shuffling data or used in games. To generate a random number in C++, the built-in functions from different libraries such as ... Read More

How do I convert a double into a string in C++?

Ravi Ranjan

Ravi Ranjan

Updated on 11-Apr-2025 17:13:47

31K+ Views

A double datatype is used to represent a decimal or exponential value and string represents a sequence of characters. In this article, we are having a double value and our task is to convert the given double into string. Here is a list of approaches to convert double to string ... Read More

How to write long strings in Multi-lines C/C++?

Ravi Ranjan

Ravi Ranjan

Updated on 10-Apr-2025 10:24:43

15K+ Views

To write long strings in multi-lines, you can use 'newline character' or 'raw string literal'. It increases the readability of the code, makes the code look clean, and you can avoid scrolling. In this article, we have a long string and our task is to write the long string in ... Read More

JavaScript Program for Number of Pairs with Maximum Sum

Ravi Ranjan

Ravi Ranjan

Updated on 27-Jan-2025 11:27:38

226 Views

JavaScript program for number of pairs with maximum sum is a common coding problem that involves finding the number of pairs in an array that have the maximum sum. This problem can be solved using various approaches which we will be discussing with code examples and their stepwise explanation. In ... Read More

React 19 - Features and Updates

Ravi Ranjan

Ravi Ranjan

Updated on 21-Nov-2024 11:25:10

905 Views

ReactJS is an open-source JavaScript library for building dynamic, single-page applications and creating reusable interactive UI components. React is developed and managed by META (earlier Facebook). ReactJS can be used to develop small applications as well as big, complex applications. Table of Content .toc_container { ... Read More

Advertisements