Neetika Khandelwal has Published 24 Articles

Replace two Substrings (of a String) with Each Other

Neetika Khandelwal

Neetika Khandelwal

Updated on 22-Aug-2023 18:05:28

89 Views

You are given three strings S, A and B. You have to replace every sub−string of S equal to A with B and every sub−string of S equal to B with A. There is a possibility that two or more sub−strings matching A or B overlap. To avoid this confusion ... Read More

Minimum Number of Operations to move all Uppercase Characters before all Lower Case Characters

Neetika Khandelwal

Neetika Khandelwal

Updated on 22-Aug-2023 17:58:44

80 Views

You are given a string 'str' that contains both uppercase and lowercase letters. Any lowercase character can be changed to an uppercase character and vice versa in a single action. The goal is to print the least possible instances of this process that are necessary to produce a string containing ... Read More

Minimum number of given Operations Required to Convert a String to Another String

Neetika Khandelwal

Neetika Khandelwal

Updated on 22-Aug-2023 17:50:09

423 Views

You are given two strings A and B, the task is to convert from string A to string B, if possible. You are allowed to perform only one operation that is to put any character from A and insert it at front. Check if it’s possible to convert the string. ... Read More

Java ArrayList to Print all Possible Words from Phone Digits

Neetika Khandelwal

Neetika Khandelwal

Updated on 22-Aug-2023 17:45:37

175 Views

You are given a keypad of mobile, and the keys that need to be pressed, your task is to print all the words which are possible to generate by pressing these numbers. Input Output Scenarios Let’s go through an example to understand this more: Input str = "32" ... Read More

Generate a String Consisting of Characters ‘a’ and ‘b’ that Satisfy the given Conditions

Neetika Khandelwal

Neetika Khandelwal

Updated on 22-Aug-2023 17:43:57

229 Views

The task is to generate a string that consists of characters ‘a’ and ‘b’ which satisfies the condition mentioned below: str must have a length of A+B. The character 'a' must appear A times and the character 'b' must appear B times within the string. The sub−strings "aaa" and ... Read More

First Come, First Serve ñ CPU Scheduling | (Non-preemptive)

Neetika Khandelwal

Neetika Khandelwal

Updated on 22-Aug-2023 17:41:30

331 Views

FCFS CPU Scheduling (First Come, First Serve) is a fundamental CPU scheduling mechanism that executes programs in the order they are added to the ready queue. In other words, the first process to come will be carried out first, and so on. Since it uses a non−preemptive scheduling technique, a ... Read More

Finding Optimal Page Size

Neetika Khandelwal

Neetika Khandelwal

Updated on 22-Aug-2023 17:36:59

134 Views

Operating system has a concept known as the optimal page size that is affected by a number of variables, such as the system architecture, the amount of physical memory at hand, and the workload of the running applications. Steps/ Approach The following steps can be used to find the ideal ... Read More

Find time taken to Execute the Tasks in A Based on the Order of Execution in B

Neetika Khandelwal

Neetika Khandelwal

Updated on 22-Aug-2023 17:34:51

53 Views

The goal is to determine the minimum time required to complete the tasks in queue A based on the order of execution in queue B, given two queues A and B, each of size N, where: Pop this task and run it if the task identified at the ... Read More

Find the Time Taken Finish Processing of given Processes

Neetika Khandelwal

Neetika Khandelwal

Updated on 22-Aug-2023 17:31:50

35 Views

Given are N processes and two N−sized arrays, arr1[] and arr2[]. A process's time in the critical section is recorded in arr1[], and it’s time to finish processing after leaving the critical part is recorded in arr2. The goal is to determine how long it will take for each process ... Read More

Find the Order of Execution of given N Processes in Round Robin Scheduling

Neetika Khandelwal

Neetika Khandelwal

Updated on 22-Aug-2023 17:24:03

220 Views

In this article, you will learn about how to find the order of execution for the given N processes in the Round Robin Scheduling algorithm. But before starting with the code, let’s understand a bit about how this algorithm works. Round Robin Scheduling is a popular CPU scheduling algorithm used ... Read More

Advertisements