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.
- Generating Test Cases (generate() and generate_n() in C++)
- Test Case Generation | Set 2 ( Random Characters, Strings and Arrays of Random Strings)
- Test Case Generation | Set 4 (Random directed / undirected weighted and unweighted Graphs)
- Test Case Generation | Set 1 (Random Numbers, Arrays and Matrices)
- Test Case Generation | Set 3 (Unweighted and Weighted Trees)
- How to prepare for Google Asia Pacific University (APAC) Test ?
- AKS Primality Test
- Vantieghems Theorem for Primality Test
- Making elements of two arrays same with minimum increment/decrement
- Pair of arrays with equal sum after removing exactly one element from each
- Minimum changes required to make two arrays identical
- Subset array sum by generating all the subsets
- Sum of nth terms of Modified Fibonacci series made by every pair of two arrays
- Probability of getting two consecutive heads after choosing a random coin among two different types of coins
- Print a case where the given sorting algorithm fails