Add LCS diffing support to NSArray

This commit is contained in:
Levi McCallum
2016-01-29 12:04:54 -08:00
parent 29609bfe87
commit 822fc96f96
3 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
//
// NSArray+Diffing.h
// AsyncDisplayKit
//
// Created by Levi McCallum on 1/29/16.
// Copyright © 2016 Facebook. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSArray (Diffing)
/**
* Uses a bottom-up memoized longest common subsequence solution to identify differences. Runs in O(mn) complexity.
*/
- (void)asdk_diffWithArray:(NSArray *)array insertions:(NSMutableIndexSet **)insertions deletions:(NSMutableIndexSet **)deletions;
@end