×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

String Algorithms

String Algorithms are algorithms to perform specify tasks on strings such as string pattern matching, searching string data and much more.

Data Structures

Anagram Trees

The objective of this OpenGenus article is to explore the concept of utilizing anagram trees, a specialized tree structure, to efficiently organize and retrieve anagrams of words.

Rito Makhubele
Algorithms

Approximate String Matching

In computer science, approximate string matching involves seeking strings in a text that closely resemble a specified pattern. In simpler terms, it's a method of searching for text matches, even when users input words with errors or provide incomplete search terms.

Odai S. Alazzeh Odai S. Alazzeh
Algorithms

Generating IP Addresses [Backtracking String problem]

In this article, we will explore a common problem of restoring IP addresses from a given string of digits. For example, given the string "25525511135", the valid IP addresses that can be generated are "255.255.11.135" and "255.255.111.35".

S Sudharshan
String Algorithms

String isomorphism

In this article, we will learn about string isomorphism and algorithms to solve this problem efficiently.

Sai Siri Chandana Namala Sai Siri Chandana Namala
Algorithms

Scramble String problem

We will be given two strings a, and b we have to check whether one string is scrambled version of other string or not.

Ue Kiao, PhD Ue Kiao, PhD
String Algorithms

Power Set of String in Lexicographic order

In this article, we have explored what is the meaning of Power Set of String and the algorithm to generate Power Set of String in Lexicographic order.

Purvak Baliyan
String Algorithms

Minimum Window Substring

Given two strings A and B. We need to find the smallest substring of A that has all the characters in B. If there is no such string, then the answer will be an empty string.

Gaurav Kumar
String Algorithms

N-th Permutation of a string

Given a string of length of `m` containing only lowercase alphabets. Find out the lexicographic `nth` permutation of the given string.

Gaurav Kumar
String Algorithms

Lexicographic next string

In this article, we are going to find the lexicographic next string for the given string.

Rahul Kumar Yadav
Algorithms

First K maximum occurring words

In this article, we will understand the different approaches to return the first k maximum occurring words from a given array. It includes core Data Structures and Algorithm topics such as Arrays, HashMap, Sorting, Priority Queue and Heap, Trie, and Bucket sort.

Astha Jain Astha Jain
String Algorithms

Check if a string can be convert to another by swapping two characters

Having two strings s1 and s2 equal in length of size n, you must check if they are equal after you swap any of two different characters. If strings are different on more than just 2 characters it must return false.

Gabriel
Algorithms

Longest word with given prefix and suffix

You are given a list of words, a prefix, and a suffix. You have to find the longest word in the given word list that has a given prefix and suffix.

Gaurav Kumar
String Algorithms

Lexicographic rank of string

We will see what is the rank of the string in lexicographic order, for the words which can be made using all the characters of the given string and calculate using a string algorithm.

Rahul Kumar Yadav
trie

Longest word in dictionary with all prefixes

Given a list of words ‘WORDLIST’, find the longest perfect word. A perfect word is a word in which all the possible prefixes are present in ‘WORDLIST’.

Gaurav Kumar
String Algorithms

Find permutations of string in lexicographic order

In this article, we have presented an algorithm to Find permutations of string in lexicographic order. We have used the concept of Recursion.

Rahul Kumar Yadav
Algorithms

Number of Substrings in String of 0s and 1s that have K 1s

In this article, we have explored algorithm to find the Number of Substrings in a String of 0's and 1's that have 'K' number of 1's.

Deepak Tiwari
String Algorithms

Find all anagrams of a given string

In this article, we have explained efficient algorithms to Find all anagrams of a given string. This involve techniques like sliding window approach.

Kartheesh Reddy Koripelli
Data Structures

Persistent Trie

In this article, we discuss the Trie data structure and how to make it persistent to solve various problems optimally.

Erick Lumunge
Algorithms

Longest Substring with at Least K repeating characters

In this article, we have presented two algorithms to find the Longest Substring with at Least K repeating characters.

Raghu Ramjee Raghu Ramjee
Algorithms

Maximum String Partition problem: Partition Labels

In this article, we have explored approaches to solve the maximum string partition problem (Partition Labels) efficiently.

Kartik Keyan Kant Kartik Keyan Kant
Algorithms

Substring with Concatenation of All Words

In this article, we have explained two approaches to solve the problem Substring with Concatenation of All Words. This involves the idea of Hash Map and Two Pointer.

Joe Gorst Joe Gorst
Algorithms

ZigZag Conversion of String with N rows

In this article, we have solved the problem of ZigZag Conversion of String with N rows. We take a string and a number N (rows) as input and distribute the string in ZigZag fashion among N rows and print the final string.

Joe Gorst Joe Gorst
Algorithms

Longest Common Prefix

In this article, we are going to explore different approaches to find the longest common prefix between two strings. Same techniques can be applied to find the Longest Common Prefix for multiple strings.

Thompson Mina
Algorithms

Longest substring without repeating characters

In this article, we have explained three approaches to the problem of finding Longest substring without repeating characters. This involves the use of Hash Map with the clever use of start and end index.

Akanksha Singh
Algorithms

Longest Common Suffix Problem

In this article, we will see how we can find the longest common suffix (i.e ending) that all the strings given to us have. We shall start with the brute-force approach for two strings. Following this, we will implement the Trie data structure to solve the problem for more than two strings.

J. Varun Iyer J. Varun Iyer
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship