Data Structure Articles

Page 4 of 164

Java program for minimum move to end operations to make all strings equal

Shubham Vora
Shubham Vora
Updated on 14-Nov-2024 283 Views

In this article, we will learn how to solve a problem where we are given an array of strings, and we need to make all strings equal by rotating them. This can be done by performing left rotations on the strings. We need to count the minimum number of operations required to do this. If it is impossible to make the strings equal, the output should be -1. Problem statement We have given an array containing n strings. All strings are permutations of each other. We need to count the total number of minimum operations required to make all strings ...

Read More

Longest double string of a Palindrome

Aishwarya Naglot
Aishwarya Naglot
Updated on 05-Nov-2024 168 Views

A contiguous sequence of characters, consisting of uppercase, lowercase, repetitive, or unique alphanumeric characters, forms a C++ string. Each string has a unique length, which may be either odd or even in nature. Longest Double String of a Palindrome A Palindromic string is a sequence of characters that reads the same from both the beginning and the end. In other words, characters at equivalent positions from the start and end have no difference. These palindromes can either have an even length or an odd length. The odd-length palindrome features a middle character separating the two equivalent halves. In this article, ...

Read More

What are the classification of security attacks in information security?

Ginni
Ginni
Updated on 21-Oct-2024 3K+ Views

There are various classification of security attack is as follows − Cryptanalytic attacks These attacks are combination of statistical and algebraic techniques objective at make sure the secret key of a cipher. These technique inspect the numerical properties of the cryptographic algorithms and aims at discovering distinguishers of the output distribution of cryptographic algorithms from the uniform distribution. Non-cryptanalytic attacks Non-cryptanalytic attacks do not exploit the numerical weakness of the cryptographic algorithm. There are three objective of security are confidentiality, integrity and availability can be very much vulnerable by this type of attack. Attacks threatening confidentiality Attacks threatening the confidentiality ...

Read More

What are the applications of cryptography in information security?

Ginni
Ginni
Updated on 21-Oct-2024 5K+ Views

There are various applications of cryptography which are as follows − Secrecy in Transmission Some existing secrecy systems for transmission access a private key system for converting transmitted data because it is the quickest approach that functions with rational guarantee and low overhead. If the multiple conversing parties is minute, key distribution is implemented periodically with a courier service and key preservation based on physical security of the keys over the method of use and destruction after new keys are disseminated. Secrecy in Storage Secrecy in storage is frequently preserved by a one-key system where the user provide the key ...

Read More

What are the basic terms used in cryptography in information security?

Ginni
Ginni
Updated on 21-Oct-2024 3K+ Views

Cryptography is an automated mathematical tool that plays an important role in network security. It supports the confidentiality and integrity of information and provide authentication and non-repudiation to the users. Cryptography is frequently used in distributed applications to transfer recognition and authentication information from one system to another over a network. Cryptographic authentication systems validate a user based on the awareness or control of a cryptographic key. Cryptographic authentication systems can be based on private key cryptosystems or public key cryptosystems. Cryptographic approach can encrypt the biometric templates or images which are saved in a database. It can enhance the ...

Read More

Java program to find longest common prefix using word by word matching

Prabhdeep Singh
Prabhdeep Singh
Updated on 29-Sep-2024 1K+ Views

In this article, we will explore how to find the longest common prefix among a given set of strings using two different approaches in Java. We will first discuss an approach that compares all strings directly to find the longest prefix and then move to a word-by-word matching approach.  Problem Statement We are given a set of strings and we have to find the common prefix among all of them. A prefix is a substring for a string that contains the zero index and could be of any length from 1 to a complete string. Input 1 string arr[] = ...

Read More

Java Program to Recursively Remove All Adjacent Duplicates

Shriansh Kumar
Shriansh Kumar
Updated on 16-Aug-2024 860 Views

The problem statement states that we have given a String str of length N (where N is an integer) containing alphanumeric characters. We need to recursively remove all adjacent duplicate characters so that the resultant string does not contain any adjacent duplicate characters. We can use a recursive or iterative approach to solve the problem. Here, we first remove the adjacent duplicate elements from the left part of the string. After that, we recursively remove the adjacent duplicates from the right part of the string. Example Scenario 1: Input: str1 = "tuttor"; Output: res = tuor The adjacent duplicate ...

Read More

Difference between Decision Table and Decision Tree

Dr. Santanu Modak
Dr. Santanu Modak
Updated on 07-Aug-2024 4K+ Views

What is a Decision Table? Decision Tables provide a structured, tabular format that clearly lists all possible conditions and corresponding actions, making them ideal for scenarios where multiple factors need to be considered simultaneously. This format is particularly useful in rule-based systems where clarity and precision are paramount. Decision Tables are often favored for their ability to handle complex logic efficiently, offering a compact overview of decisions in a concise, easy-to-update format. Example of a Decision TableLet's take the scenario of Online Order Discount Eligibility. An e-commerce company uses a decision table to determine whether customers are ...

Read More

Java program to find length of the longest substring without repeating characters

Prabhdeep Singh
Prabhdeep Singh
Updated on 24-Jul-2024 2K+ Views

In Java, substrings are part of the string which contains the continuous character of the string of any length from 1 to complete string. We are given a string and we have to find the length of the largest substring from the given string that only contains the unique characters. We will see three types of methods: finding every substring, sliding windows, and two-pointers. Problem Statement Given a string, write a Java program to find length of the longest substring without repeating characters − Input thisisthegivenstring Output The length of the longest substring that contains only unique characters is: ...

Read More

Difference between Min Heap and Max Heap

Shirjeel Yunus
Shirjeel Yunus
Updated on 15-Jul-2024 3K+ Views

A heap is a data structure which is based on tree. This tree is a complete binary tree which consists of N nodes and log N height. The elements whose priority is highest or lowest can be easily removed. This heap structure is displayed in the form of an array. The heaps can be used to derive maximum and minimum values. Heap is of two types which are Min Heap and Max heap and in this article, we will see the difference between them. What is Min Heap? The key in the Min Heap is available at the root node. ...

Read More
Showing 31–40 of 1,635 articles
« Prev 1 2 3 4 5 6 164 Next »
Advertisements