Cerinta completa Amanda has a string of lowercase letters that she wants to copy to a new string. She can perform the following operations with the given costs. She can perform them any number of times to construct a new
Similar Strings
Cerinta completa Jimmy loves playing with strings. He thinks string is similar to string if the following conditions are satisfied: Both strings have the same length (i.e., and ). For each valid pair of indices, , in the strings, and
Sherlock and Anagrams
Cerinta completa Two strings are anagrams of each other if the letters of one string can be rearranged to form the other string. Given a string, find the number of pairs of substrings of the string that are anagrams of
Shashank and the Palindromic Strings
Cerinta completa Shashank loves strings, but he loves palindromic strings the most. He has a list of strings, , where each string, , consists of lowercase English alphabetic letters. Shashank wants to count the number of ways of choosing non-empty
Sequence Equation
Cerinta completa Given a sequence of integers, where each element is distinct and satisfies . For each where , that is increments from to , find any integer such that and keep a history of the values of in a
Sam’s Puzzle (Approximate)
Cerinta completa Sam invented a new puzzle game played on an matrix named , where each cell contains a unique integer in the inclusive range between and . The coordinate of the top-left cell is . The Moves A move
Reverse Shuffle Merge
Cerinta completa Given a string, , we define some operations on the string as follows: a. denotes the string obtained by reversing string . Example: b. denotes any string that’s a permutation of string . Example: c. denotes any string
Recording Episodes
Cerinta completa Dave is a die-hard fan of a show called “HackerRank”, in which a young programmer uses her problem-solving abilities to solve crimes. He splurged on a Digital Video Recorder (DVR) so that he can record HackerRank episodes and
Quicksort 1 – Partition
Cerinta completa The previous challenges covered Insertion Sort, which is a simple and intuitive sorting algorithm with a running time of . In these next few challenges, we’re covering a divide-and-conquer algorithm called Quicksort (also known as Partition Sort). This
Prim’s (MST) : Special Subtree
Cerinta completa Given a graph which consists of several edges connecting its nodes, find a subgraph of the given graph with the following properties: The subgraph contains all the nodes present in the original graph. The subgraph is of minimum
