¡@

Home 

2014/10/15 ¤U¤È 10:12:32

iphone Programming Glossary: pc_next_permutation

Permutations/Anagrams in Objective-C — I am missing something

http://stackoverflow.com/questions/6617253/permutations-anagrams-in-objective-c-i-am-missing-something

as strings like I want them not just an array of characters in another array . I am assuming the magic would happen in pc_next_permutation anyway but thought I would mention it. In NSArray Permutation.h #import Foundation Foundation.h @interface NSArray Permutation.. NSArray allPermutationsArrayofStrings @end in NSArray Permutation.m #define MAX_PERMUTATION_COUNT 20000 NSInteger pc_next_permutation NSInteger perm const NSInteger size NSInteger pc_next_permutation NSInteger perm const NSInteger size slide down the array.. #define MAX_PERMUTATION_COUNT 20000 NSInteger pc_next_permutation NSInteger perm const NSInteger size NSInteger pc_next_permutation NSInteger perm const NSInteger size slide down the array looking for where we're smaller than the next guy NSInteger pos1..