문제

Back in C I had a custom black red tree implementation to store/insert/search/etc a high range of data structs during runtime, I'd like to ask how this is done in objective-c/cocoa, for example, is there a built-in functionality similar to this in some framework?

Thank you for your time.

도움이 되었습니까?

해결책

You can surely use your custom black red tree implementation in Objective-C.

More in general, I don't know of any "native" black red tree implementation in Objective C, but I would simply take a C one, put an ObjC wrapper around it if you wish to make it reference-counting-aware, and go with it.

You could also check CHDataStructures, which includes a nice collection of ObjC data structures (they also have search trees, though I don't know it that would be black red tree).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top