Problem Statement We have given a positive integer num. We need to find the lexicographically largest string of lowercase alphabetical characters such that the sum of all characters of the string is equal to num. Here, ‘a’ = 1, ‘b’ = 2, ‘c’ = 3, ‘d’ = 4, …., ‘z’ = 26. We need to use the ‘z’ characters at the string's start to create the largest lexicographical string. At last, we need to use the last character according to the num % 26 value. Sample Examples Input num = 30 Output ‘zd’ Explanation The ‘zd’ is the ... Read More
Within the domain of present-day cryptography, two noticeable calculations have played significant parts in securing delicate information Diffie-Hellman and RSA. Whereas both strategies are broadly utilized for key trade and encryption, they employ effective approaches to attain their cryptographic objectives. Diffie-Hellman, created by Whitfield Diffie and Martin Hellman in 1976, focuses on securing key trade conventions, empowering parties to set up a shared mystery over an uncertain channel. On the other hand, RSA, named after its makers Ron Rivest, Adi Shamir, and Leonard Adleman, utilizes public-key encryption to defend information secrecy, verification, and computerized marks. This article dives into the ... Read More
In Python, saving files with user−defined file names is a common requirement in various applications and projects. By allowing users to specify the file name, we can provide them with a more personalized and customizable experience. This article will explain the process of saving files with file names provided by the user, using Python. Algorithm A general algorithm for saving file with file name from user is as follows: Prompt the user to enter the desired file name. ... Read More
Problem Statement We have given binary string str of length N. We need to find all permutations of the string, convert them to the decimal value, and return all unique decimal values. Sample Examples Input str = ‘1’ Output [1] Explanation All permutations of the ‘1’ is only ‘1’. So, the decimal value related to ‘1’ equals 1. Input str = ‘10’ Output [1, 2] Explanation The permutations of ‘10’ are only ‘01’ and ‘10’, equivalent to 1 and 2, respectively. Input ‘101’ Output [3, 5, 6] Explanation All possible permutations of ‘101’ are ... Read More
Digital encryption technology plays a crucial role in data transmission over communication channels. Manchester encoding and differential Manchester encoding are two good methods for efficiently transmitting digital data. The purpose of this article is to comprehensively compare these two coding schemes and highlight their unique characteristics, advantages, and differences. Manchester encoding, known for its simplicity and widespread use, uses transitions at the beginning or end of each bit period to represent bit values. In contrast, differential Manchester coding, also known as biphase mark code, uses transitions to transmit values. This important difference gives rise to some conflicting properties that affect ... Read More
Problem Statement We have given a two-dimensional array containing the pairs of starting and ending times for time intervals in the 12-hour format. Also, we have given string str in the 12-hour time format. We need to find a total number of intervals which included the time represented by str. Sample Examples Input arr[][2] = {{“12:02:AM”, “10:55:PM”}, {“12:51:AM”, “11:40:AM”}, {“01:30:AM”, “12:00:PM”}, {“11:57:PM”, “11:59:PM”}}, str = “2:30:AM” Output 3 Explanation The time “2:30:AM” intersects the first three intervals. Input arr[][2] = {{“01:02:PM”, “10:55:PM”}, {“01:30:AM”, “11:00:AM”}}, str = “11:30:PM” Output 0 Explanation The ... Read More
Scheduling algorithms are designed for serving the processes by providing the maximum utilization of the resources. The resources that are allocated to execute the given input, should not remain idle and repetitive projects has to be handled by the resources simultaneously without any break. Considering all these factors, a few simulation approaches have been developed to improve the repetitive activities by analyzing the nature of the process but none of the approaches delivered maximum resource utilization. Later, the sequence step algorithm has been initiated to minimize the processing and execution time of the process by determining the probability of process ... Read More
Linux is widely used both as a Desktop Operating System and to create server platforms. Linux can be used to build standalone servers, and mail servers, create a web server, and set up a gateway for LAN. It is extensively used in the fields of telecommunications, embedded systems, satellites, medical equipment, military systems, computer graphics, and desktop computing. 75 percent of the world's top supercomputers run on the LINUX operating system. Setting Up a Linux Multifunction Server Creating a Linux Multifunction server First, we need to install the Debian distribution of Linux. Then configure the network manually. We need to ... Read More
The people in the world are involved in data usage and lots of services that make the work easier. To compromise the need for high usage and data, server Operating systems are developed to provide services to many users concurrently. Server Operating System is a type of Operating system with advanced features that can be used only on servers. It is designed to use in-server computers to handle various users and requests at a time. When a person or company requires data it cannot be served using a human instead the solution is given by a machine. Server Operating System ... Read More
In an operating system, segmentation is termed a memory management technique where the memory is divided into segments that can be allocated to a process. These segments may not be in fixed length and not stored in a contagious manner. This approach has been developed after the paging process which takes multiple pages for a process to get loaded into main memory, whereas segmentation divided the code into segments as its relative code can be merged to form a single block. The segment table holds all the details relating to the segments and the processes. Generating a logical address which ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP