Introduction CentOS 7 is a popular Linux distribution known for its stability and security. If you're looking to set up a web server on CentOS 7, you'll likely need to install Apache, MySQL or MariaDB, and PHP. In this comprehensive guide, we will walk you through the installation process of these components, along with examples and their outputs, to ensure a successful setup. Prerequisites Before we begin, make sure you have the following prerequisites in place − CentOS 7 installed on your server or virtual machine. Root access or sudo privileges to execute commands with administrative rights. Update the System ... Read More
In this problem, we will sort the array of strings in the lexicographical order. There are various sorting algorithms to sort the array of strings. In this tutorial, we will use the built−in sort() method to sort the strings. Also, we will use the merge sort algorithm, one of the efficient approaches to sort the array of strings. Problem statement − We have given an str[] array containing N strings. We need to sort all strings in the lexicographical order. Sample examples Input str[] = {"tutorials", "point", "save", "java", "c++"} Output c++, java, point, save, tutorials ... Read More
Pandas DataFrame is a part of the Data Structure that is used to represent the 2D structure in tabular form(rows and columns). In Python, we have some built-in functions like eq(), any(), loc[], and, apply() that can be used to search a value within a Pandas DataFrame row. For example- Searching a value is defined by the availability of any specific data. Syntax The following syntax is used in the examples − DataFrame() This is an in-built function in Python that follows the pandas module and show the 2D rows and column into a single frame. eq() This ... Read More
In this problem, we will perform M reverse queries on the given string according to the array values. The naïve approach to solving the problem is to reverse each string segment according to the given array value. The optimized approach uses the logic that when we reverse the same substring two times, we get the original string. Problem statement − We have given an alpha string containing the alphabetical characters. Also, we have given an arr[] array of size M containing the positive integers. We need to perform the M operations on the given string and return the final ... Read More
In this problem, we will count the number of characters whose frequency and position have the same parity and print the count of the number as odd or even. To solve the problem, we can find the frequency of each character in the string, and count total characters whose freqeuncy and position have the same parity. After that, we can print the odd or even answer based on the counts. Problem statement − We have given a string alpha containing only lowercase english alphabetical characters. We need to check whether the number of characters having equal parity of their alphabetical ... Read More
Introduction MongoDB is a popular open-source NoSQL database management system known for its scalability, flexibility, and ease of use. If you're using a Linux operating system and looking to install MongoDB Community Edition 4.0, this article will provide you with a detailed guide accompanied by examples and the corresponding command outputs. Prerequisites Before proceeding with the installation, ensure that you have the following prerequisites − A Linux-based operating system (e.g., Ubuntu, CentOS, or Debian). Root or sudo privileges. An active internet connection. Step 1: Import the MongoDB GPG Key To begin the installation process, we first need to ... Read More
Introduction LXC, short for Linux Containers, is an operating system-level virtualization method that allows you to run multiple isolated Linux systems (containers) on a single host. It provides a lightweight and efficient alternative to traditional virtualization technologies. In this article, we will guide you through the process of installing LXC on RHEL, Rocky Linux, and AlmaLinux, three popular distributions known for their stability and security. Prerequisites Before proceeding with the installation, ensure that you have the following prerequisites − A supported version of RHEL, Rocky Linux, or AlmaLinux. Sudo or root access to the system. An internet connection. ... Read More
Introduction RockyAlmaLinux is a robust and secure Linux distribution that serves as a perfect replacement for CentOS. If you're looking to set up a web server environment using Lighttpd, PHP, and MariaDB. This article will guide you through the installation process. We'll provide detailed instructions along with examples and the expected output of each command. Prerequisites Before we begin, make sure you have administrative access to your RockyAlmaLinux system and an active internet connection. Step 1: Update the System First, let's update the system's package repositories and upgrade the installed packages to their latest versions. Open a terminal and run ... Read More
In this problem, we will print the minimum number of characters that we need to remove from the start and end to make the count of ‘1’ and ‘0’ the same in the given string. If we find the largest substring with an equal number of ‘1’ and ‘0’, we can get the answer by subtracting the substring length from the given string’s length. We will use the prefix sum technique to find the largest substring having an equal number of ‘1’ and ‘0’. Problem statement − We have given the ‘bin_str’ binary string containing the N characters. We ... Read More
In this problem, we will divide the given binary string into the K subsequences such that we can minimize the maximum absolute difference of count of ‘1’ and ‘0’ in the given string. The logic to solve the problem is to create a maximum pair of 0 and 1 in subsequences. So, we can get the minimum difference between each subsequence. Problem statement − We have given a bin_str binary string of length N. We have also given the positive integer K. We need to divide the given string into the K disjoint subsequences to minimize the maximum absolute ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP