java - Recursive function to check whether sub-array -


i trying write recursive function check whether 1 array contained in second array (my example sub-array) , returns true or false.

for example: [d, e] contained in [a, b​​, c, d, e, f]

.

i know how check without recursion (using loops), can not think of solution using recursion.

you can use hashing store elements of large array in hash table , check whether each element of sub array there in hash table or not, if elements found subarray.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -