Maximum length subarray with LCM equal to product in C++

Arnab Chakraborty
Published on 21-Oct-2019 10:34:32
Suppose we have an array A. We have to find the maximum length of the subarray, whose LCM is the same as the product of the elements of that subarray. If that kind of subarray is not found, then return -1. Suppose array is {6, 10, 21}, then the length ... Read More

Maximum GCD of N integers with given product in C++

Arnab Chakraborty
Published on 21-Oct-2019 10:31:26
Suppose we two integers N and P. The P is the product of N unknown integers. We have to find the maximum possible GCD of those integers. Suppose N = 3, and P = 24, then different groups will be like {1, 1, 24}, {1, 2, 12}, {1, 3, 8}, ... Read More

How to find and sort files based on modification date and time in linux

Lakshmi Srinivas
Published on 21-Oct-2019 10:28:26
While working with computers, we have a habit of saving a lot of information in our computers such as files, folders, etc. Normally desktop looks like a mess but the problem arises when users want to search a modified file on a particular date or time. There are simple commands ... Read More

Maximum GCD from Given Product of Unknowns in C++

Arnab Chakraborty
Published on 21-Oct-2019 10:26:39
Suppose we two integers N and P. The P is the product of N unknown integers. We have to find the GCD of those integers. There can be different groups of integers possible, that will give the same result. Here we will produce GCD, which is maximum among all possible ... Read More

How to find and kill running processes in linux

Lakshmi Srinivas
Published on 21-Oct-2019 10:17:13
Do you think Linux computers will automatically handle process by itself? Sometimes administrators need to handle processes. Process management is one of the important aspects for Linux administrators. This article describes”How to find and kill running processes in Linux”.Linux creates a process whenever a program is opened, either by the ... Read More

How to show historical and statistical running time of linux systems

Lakshmi Srinivas
Published on 21-Oct-2019 10:14:54
The important part of the system administrators is to monitor and examine for a way long Linux system has been strolling. It is a just right concept to hold tracking up time of the Linux systems to optimise the system assets. This article describes Tuptime tool that can help System Administrators ... Read More

How to use rainbow colors in linux terminal

Lakshmi Srinivas
Published on 21-Oct-2019 10:08:17
This article is for those who believe that Linux command line is boring and there is not much fun. To create an interesting colorful setting lolcat utility can be used, which produces rainbow colors in Linux terminal. Lolcat utility works for Linux, BSD and OSX which concatenates like similar to ... Read More

How to generateencryptdecrypt random passwords in linux

Lakshmi Srinivas
Published on 21-Oct-2019 10:03:45
Security is one of the major concern in the cyber world. Cyber security, also referred to as information technology security, focuses on protecting computers, networks, programs and data from unintended or unauthorized access, change or destruction. We use passwords for computers, emails, cloud, phone, documents and what not. We all ... Read More

How to convert a JSON object to an enum using Jackson in Java?

raja
Published on 18-Oct-2019 17:51:24
A JSONObject can parse the text from String to produce a Map kind of an object. An Enum can be used to define a collection of constants, when we need a predefined list of values which do not represent some kind of numeric or textual data then we can use an enum. We ... Read More

C Program to convert first character uppercase in a sentence

Sunidhi Bansal
Published on 18-Oct-2019 17:51:22
Given a string and with mixed case, i.e with both uppercase and lower case, the task is to covert the first character to uppercase rest in lowercase if it’s in upper case.Let’s understand it in depth with the help of a simple example.Like we are given a string “hElLo world”, ... Read More
1 2 3 4 5 6 7 ... 2669 Next
Advertisements