In the given problem, we are required to print all the divisors of a given integer n.Input: 15 Output: 1 3 5 15 Explanation Divisors of 15 are: 1, 3, 5, 15 Input: 30 Output: 1 2 3 5 15 30In the given problem, we can apply the approach used in the sieve of Eratosthenes for finding all the divisors of n.Approach to find The SolutionIn the given approach, we will apply the concept in which the sieve of Eratosthenes is based and find the divisors of n.Example#include #define MOD 1000000007 using namespace std; vector divisors[100001]; ... Read More
The different types of mobile operating system are as follows −Android OS (Open source)Android Operating System is one of the popular software developed by Android Inc Company. It’s an excellent rise because it was created just in 2008.The question is − Where can we download Android Apps?If you've got the Android-based phone you'll realize Google Play, the Android market, where you'll find tons of applications for this OS. It’s about 700 000 apps there.Features of Android OSThe features of Android OS are as follows −The interface of Android was developed in order to fulfil all user requirements.You can decorate your ... Read More
In this article, we are given an array of integers. We are tasked to find the bitwise OR of all the numbers present in the given range, for example, Input: arr[] = {1, 3, 1, 2, 3, 4}, q[] = {{0, 1}, {3, 5}} Output: 3 7 1 OR 3 = 3 2 OR 3 OR 4 = 7 Input: arr[] = {1, 2, 3, 4, 5}, q[] = {{0, 4}, {1, 3}} Output: 7 7In the given problem, we will approach it with a brute force approach and then check if it can work for higher constraints or not. ... Read More
The features of operating systems are increasing day by day. Because at the starting development of the OS it was used to handle storage taps but now it is working on GUI by throwing brilliant colours.Given below are the features of the operating system −Memory ManagementThe operating system controls the primary memory or main memory.Primary memory is a large array of bytes or words where each byte or word is assigned a certain address.It is a fast storage, and it can be accessed directly by the CPU which is present inside the system. If a program wants to be executed, ... Read More
In this article we will discuss a problem of finding the number of elements present in the given range that have a kth bit set, for example −Input : arr[] = { 4, 5, 7, 2 } Query 1: L = 2, R = 4, K = 4 Query 2: L = 3, R = 5, K = 1 Output : 0 1We are going to solve this problem by a brute force approach and see if this approach can work for higher constraints or not. If not, then we try to think of a new efficient approach.Brute ... Read More
Kernel is the important part of an Operating System. The kernel is the first program that is loaded after the boot loader whenever we start a system. The Kernel is present in the memory until the Operating System is shut-down.Kernel provides an interface between the user and the hardware components of the system. When a process makes a request to the Kernel, then it is called System Call.FunctionsThe functions of the kernel are as follows −Process managementAccess computer resourcesDevice managementMemory managementInterrupt handlingI/O communicationFile system...etc.Access Computer resource − A Kernel accesses various computer resources like the CPU, I/O devices and other ... Read More
Each operating system has its own advantages and disadvantages, let us discuss in general the benefits and drawbacks of operating systems.AdvantagesThe advantages of Operating system are as follows −Computing Source − OS acts as an interface between the user and the hardware. It allows users to perform different tasks like input data, process the operation, and access the output. With the help of an operating system, users can communicate with computers to perform various functions like arithmetic calculations.User-Friendly Interface − Whenever the Windows operating system came into existence with Graphical User Interface (GUI), it became user friendly. It also helps ... Read More
The operating system is a software which handles the computer's functionality like scheduling, input/output operation, resource allocation, file system manipulation, etc. and it acts as an interface between the user and hardware.The different types of operating systems are as follows −Batch Operating SystemMultiprogramming Operating SystemMultitasking Operating SystemMultiprocessing Operating SystemReal time Operating SystemLet us discuss the embedded operating system.Embedded Operating systemAll Embedded Systems are task specific. They mostly do a particular task on loop/repeatedly for their entire lifetime. These systems are designed to execute their task within a particular time interval, and thus they have to be fast enough to be ... Read More
The operating system is a software which handles the computer's functionality like scheduling, input/output operation, resource allocation, file system manipulation, etc. and it acts as an interface between the user and hardware.The different types of operating systems are as follows −Batch Operating SystemMultiprogramming Operating SystemMultitasking Operating SystemMultiprocessing Operating SystemReal time Operating SystemNow let us discuss the Network operating system.Network Operating SystemThe OS specializes in network devices such as a router, switch, or firewall. The OS manages these network resources. The OS supports workstations, Personal Computers (PCs), older terminals connected on a Local Area Network (LAN).Examples of Network OSs are Microsoft ... Read More
The operating system is a software which handles the computer's functionality like scheduling, input/output operation, resource allocation, file system manipulation, etc. and it acts as an interface between the user and hardware.The different types of operating systems are as follows −Batch Operating SystemMultiprogramming Operating SystemMultitasking Operating SystemMultiprocessing Operating SystemReal time Operating SystemNow, let us discuss the Real time operating system.Real-time operating systemAll real time operating systems are designed to execute their task within a particular time interval, and thus they have to be fast enough to be up to their deadline.Time constraints related with real-time systems simply means that time ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP