Generating Random Sorted Arrays
We store the random array elements in an array and then sort it and print it.
Generating Random Palindromes
- The test case generation plan generates odd as well as even length palindromes.
- The test case generation plan uses one of the most under-rated data structure- Deque
- Since a palindrome is read the same from left as well as right so we simply put the same random characters on both the left side (done using push_front()) and the right side (done using push_back())
This article is contributed by Rachit Belwariar. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
References : –
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Test Case Generation | Set 2 ( Random Characters, Strings and Arrays of Random Strings)
- Test Case Generation | Set 1 (Random Numbers, Arrays and Matrices)
- Test Case Generation | Set 4 (Random directed / undirected weighted and unweighted Graphs)
- Test Case Generation | Set 3 (Unweighted and Weighted Trees)
- Generating Test Cases (generate() and generate_n() in C++)
- Test case generator for Tree using Disjoint-Set Union
- Split a string in equal parts such that all parts are palindromes
- Subset array sum by generating all the subsets
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Print a case where the given sorting algorithm fails
- Find sub-arrays from given two arrays such that they have equal sum
- Probability of getting two consecutive heads after choosing a random coin among two different types of coins
- Find two numbers whose divisors are given in a random order
- Minimum size binary string required such that probability of deleting two 1's at random is 1/X
- Count numbers from range whose prime factors are only 2 and 3 using Arrays | Set 2
- Maximum sum by picking elements from two arrays in order | Set 2
- Minimum increment or decrement operations required to make the array sorted
- Check if a decreasing Array can be sorted using Triple cyclic shift
- Merge two unsorted linked lists to get a sorted list
- Missing even and odd elements from the given arrays