What is Information Security

Ginni
Updated on 03-Mar-2022 07:46:16

6K+ Views

Information security is a set of practices designed to carry private data secure from unauthorized access and alteration for the duration of storing or transmitting from one location to another.Information security is designed and carried out to protect the print, digital, and other private, sensitive, and private data from unauthorized persons. It can be used to secure data from being misused, acknowledgment, destruction, alteration, and disruption.Computer networks are connected in daily transactions and communication inside the government, private, or corporates that needs security. The most common and easy method of protecting network support is assigning it with a unique name ... Read More

Find Array After Removal of Left Occurrences of Duplicate Elements in C++

Arnab Chakraborty
Updated on 03-Mar-2022 07:40:37

187 Views

Suppose we have an array A with n elements. We want to remove duplicate elements. We want to leave only the rightmost entry for each element of the array. The relative order of the remaining unique elements should not be changed.So, if the input is like A = [1, 5, 5, 1, 6, 1], then the output will be [5, 6, 1]StepsTo solve this, we will follow these steps −Define two arrays b and vis of size: 1200 each x := 0 n := size of A for initialize i := n - 1, when i >= 0, update (decrease ... Read More

Find Maximum Possible Amount of Allowance in C++ Game

Arnab Chakraborty
Updated on 03-Mar-2022 07:40:24

270 Views

Suppose we have three numbers A, B and C. Consider a game: There are three "integer panels", each with a digit form 1 to 9 (both inclusive) printed on it, and one "operator panel" with a '+' sign printed on it. The player should make a formula of the form X+Y, by arranging the four panels from left to right. Then, the amount of the allowance will be equal to the resulting value of the formula.We have to find the maximum possible amount of the allowance.So, if the input is like A = 1; B = 5; C = 2, ... Read More

Calculate Years to Get X Rupees with 1% Interest in C++

Arnab Chakraborty
Updated on 03-Mar-2022 07:37:50

208 Views

Suppose we have a number X. We have 100 rupees in a bank. The bank returns annual interest rate of 1 % compounded annually. (Integers only). We have to check how many years we need to get X rupees?So, if the input is like X = 520, then the output will be 213.StepsTo solve this, we will follow these steps −sum := 0 balance := 100 while balance < n, do:    interest := balance / 100    sum := sum + 1    balance := balance + interest return sumExampleLet us see the following implementation to get better understanding ... Read More

Find Number of Distinct Values After Negating a Subarray in C++

Arnab Chakraborty
Updated on 03-Mar-2022 07:33:05

249 Views

Suppose we have an array A with n elements. We select any subset of given numbers and negate these numbers. We have to find maximum number of different values in the array we can get.So, if the input is like A = [1, 1, 2, 2], then the output will be 4, because we can negate first and last numbers to make the array [-1, 1, 2, -2] with four different values.StepsTo solve this, we will follow these steps −Define one set se n := size of A for initialize i := 0, when i < n, update (increase i ... Read More

Count Expected Number of Operations for Node Removal in C++

Arnab Chakraborty
Updated on 03-Mar-2022 07:28:50

256 Views

Suppose we have the adjacency matrix of a directed graph G. Until the graph becomes empty, we are repeating the following operation: Select one vertex from G, then erase that vertex and all vertices that are reachable from that vertex by following some edges. Erasing a vertex will also erase the edges incident to it. We have to find the expected number of times the operation is doneSo, if the input is likethen the output will be 1.6667, because initially select vertex A, remove all vertices, if we select vertex B, remove B and C, and in second operation select ... Read More

Find N Valid Bracket Sequences in C++

Arnab Chakraborty
Updated on 03-Mar-2022 07:28:11

503 Views

Suppose we have a number n. As we know, a bracket sequence is a string containing only characters "(" and ")". A valid bracket sequence is a bracket sequence which can be transformed into a correct arithmetic expression by inserting characters "1" and "+" between the original characters of the sequence. So, if a bracket sequence is like "()()" this is valid because we can put 1's like "(1)+(1)". From number n, we have to find exactly n different possible valid bracket sequences of length 2n.So, if the input is like n = 4, then the output will be ["()()()()", ... Read More

Python Numpy meshgrid

Syed Abeed
Updated on 03-Mar-2022 07:28:05

952 Views

numpy.meshgrid() is used to return coordinate matrices from coordinate vectors. Its syntax is as follows −numpy.meshgrid(*xi, **kwargs)ParametersMeshgrid can accept the following parameters −x1, x2, …, xn − It represents the coordinates of a grid.indexing − It is an optional parameter which defines the Cartesian 'xy' by default and matrix 'ij' index of output.sparse − It is an optional parameter. If we like to use sparse grid for conserving memory, then we have to set this parameter to True. By default, it is False.copy − It returns a copy of the original array for conversing memory when the parameter is True. ... Read More

Find Fourth Side of a Quadrilateral in C++

Arnab Chakraborty
Updated on 03-Mar-2022 07:24:58

311 Views

Suppose we have three numbers a, b and c. We want to make a closed fence in a shape of arbitrary non-degenerate simple quadrilateral. We already have three sides of length a, b and c. We have to find another side d.So, if the input is like a = 12; b = 34; c = 56, then the output will be 42, other answers are also possible.StepsTo solve this, we will follow these steps −return a + b + c - 2ExampleLet us see the following implementation to get better understanding −#include using namespace std; int solve(int a, int ... Read More

C++ Program to Find Range Whose Sum is Same as N

Arnab Chakraborty
Updated on 03-Mar-2022 07:22:36

217 Views

Suppose we have a number n. We need to find two integers l and r, such that l < r and l + (l + 1) + ... + (r - 1) + r = n.So, if the input is like n = 25, then the output will be l = -2 and r = 7, because (−2) + (−1) + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 = 25. Other answers are also possible.StepsTo solve this, we will follow these steps −return -(n-1) and nExampleLet us see the following implementation to get better understanding −#include using namespace std; void solve(int n){    cout

Advertisements