-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Pramod Nepal edited this page Apr 3, 2017
·
14 revisions
- Java Util
-
Nashorn Javascript
- For more see Winterbe Java 8 Nashorn Tutorial
- Integer Change Radix
- StringBuilder char replace
-
Recursion using subset problem (Combination)
- Create a list only once, by making index reach to size of list
- Recursively get the global list and loop through it and add current item to each items of the list to create a new list
- Add the newely created list back to global list and return to the previous caller
-
Another Recursion Solution using Permutation
- Start with full list and empty prefix
- When the list becomes empty prefix is full (same size as original list), print the prefix (Ordering matters)
- At each stack frame (when the list is not empty), loop through each item of the list, create a new list without the current item in the list, but attach current item to suffix of prefix