forked from kodecocodes/swift-algorithm-club
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve heap, add priority queue, add heap sort
- Loading branch information
Showing
52 changed files
with
3,584 additions
and
309 deletions.
There are no files selected for viewing
398 changes: 398 additions & 0 deletions
398
Heap Sort/HeapSort Tests/HeapSort.xcodeproj/project.pbxproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,398 @@ | ||
// !$*UTF8*$! | ||
{ | ||
archiveVersion = 1; | ||
classes = { | ||
}; | ||
objectVersion = 46; | ||
objects = { | ||
|
||
/* Begin PBXBuildFile section */ | ||
7B1BFA451C69158D0051C9A4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1BFA441C69158D0051C9A4 /* AppDelegate.swift */; }; | ||
7B1BFA471C69158D0051C9A4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B1BFA461C69158D0051C9A4 /* Assets.xcassets */; }; | ||
7B1BFA4A1C69158D0051C9A4 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7B1BFA481C69158D0051C9A4 /* MainMenu.xib */; }; | ||
7B1BFA551C69158D0051C9A4 /* HeapSortTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1BFA541C69158D0051C9A4 /* HeapSortTests.swift */; }; | ||
7B1BFA601C69159D0051C9A4 /* HeapSort.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1BFA5F1C69159D0051C9A4 /* HeapSort.swift */; }; | ||
7B1BFA621C6915A70051C9A4 /* Heap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1BFA611C6915A70051C9A4 /* Heap.swift */; }; | ||
/* End PBXBuildFile section */ | ||
|
||
/* Begin PBXContainerItemProxy section */ | ||
7B1BFA511C69158D0051C9A4 /* PBXContainerItemProxy */ = { | ||
isa = PBXContainerItemProxy; | ||
containerPortal = 7B1BFA391C69158D0051C9A4 /* Project object */; | ||
proxyType = 1; | ||
remoteGlobalIDString = 7B1BFA401C69158D0051C9A4; | ||
remoteInfo = HeapSort; | ||
}; | ||
/* End PBXContainerItemProxy section */ | ||
|
||
/* Begin PBXFileReference section */ | ||
7B1BFA411C69158D0051C9A4 /* HeapSort.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HeapSort.app; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
7B1BFA441C69158D0051C9A4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; | ||
7B1BFA461C69158D0051C9A4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | ||
7B1BFA491C69158D0051C9A4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; }; | ||
7B1BFA4B1C69158D0051C9A4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||
7B1BFA501C69158D0051C9A4 /* HeapSortTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HeapSortTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
7B1BFA541C69158D0051C9A4 /* HeapSortTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeapSortTests.swift; sourceTree = "<group>"; }; | ||
7B1BFA561C69158D0051C9A4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||
7B1BFA5F1C69159D0051C9A4 /* HeapSort.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HeapSort.swift; path = ../../HeapSort.swift; sourceTree = "<group>"; }; | ||
7B1BFA611C6915A70051C9A4 /* Heap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Heap.swift; path = ../../../Heap/Heap.swift; sourceTree = "<group>"; }; | ||
/* End PBXFileReference section */ | ||
|
||
/* Begin PBXFrameworksBuildPhase section */ | ||
7B1BFA3E1C69158D0051C9A4 /* Frameworks */ = { | ||
isa = PBXFrameworksBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
7B1BFA4D1C69158D0051C9A4 /* Frameworks */ = { | ||
isa = PBXFrameworksBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXFrameworksBuildPhase section */ | ||
|
||
/* Begin PBXGroup section */ | ||
7B1BFA381C69158D0051C9A4 = { | ||
isa = PBXGroup; | ||
children = ( | ||
7B1BFA431C69158D0051C9A4 /* HeapSort */, | ||
7B1BFA531C69158D0051C9A4 /* HeapSortTests */, | ||
7B1BFA421C69158D0051C9A4 /* Products */, | ||
); | ||
sourceTree = "<group>"; | ||
}; | ||
7B1BFA421C69158D0051C9A4 /* Products */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
7B1BFA411C69158D0051C9A4 /* HeapSort.app */, | ||
7B1BFA501C69158D0051C9A4 /* HeapSortTests.xctest */, | ||
); | ||
name = Products; | ||
sourceTree = "<group>"; | ||
}; | ||
7B1BFA431C69158D0051C9A4 /* HeapSort */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
7B1BFA441C69158D0051C9A4 /* AppDelegate.swift */, | ||
7B1BFA461C69158D0051C9A4 /* Assets.xcassets */, | ||
7B1BFA611C6915A70051C9A4 /* Heap.swift */, | ||
7B1BFA5F1C69159D0051C9A4 /* HeapSort.swift */, | ||
7B1BFA4B1C69158D0051C9A4 /* Info.plist */, | ||
7B1BFA481C69158D0051C9A4 /* MainMenu.xib */, | ||
); | ||
path = HeapSort; | ||
sourceTree = "<group>"; | ||
}; | ||
7B1BFA531C69158D0051C9A4 /* HeapSortTests */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
7B1BFA541C69158D0051C9A4 /* HeapSortTests.swift */, | ||
7B1BFA561C69158D0051C9A4 /* Info.plist */, | ||
); | ||
path = HeapSortTests; | ||
sourceTree = "<group>"; | ||
}; | ||
/* End PBXGroup section */ | ||
|
||
/* Begin PBXNativeTarget section */ | ||
7B1BFA401C69158D0051C9A4 /* HeapSort */ = { | ||
isa = PBXNativeTarget; | ||
buildConfigurationList = 7B1BFA591C69158D0051C9A4 /* Build configuration list for PBXNativeTarget "HeapSort" */; | ||
buildPhases = ( | ||
7B1BFA3D1C69158D0051C9A4 /* Sources */, | ||
7B1BFA3E1C69158D0051C9A4 /* Frameworks */, | ||
7B1BFA3F1C69158D0051C9A4 /* Resources */, | ||
); | ||
buildRules = ( | ||
); | ||
dependencies = ( | ||
); | ||
name = HeapSort; | ||
productName = HeapSort; | ||
productReference = 7B1BFA411C69158D0051C9A4 /* HeapSort.app */; | ||
productType = "com.apple.product-type.application"; | ||
}; | ||
7B1BFA4F1C69158D0051C9A4 /* HeapSortTests */ = { | ||
isa = PBXNativeTarget; | ||
buildConfigurationList = 7B1BFA5C1C69158D0051C9A4 /* Build configuration list for PBXNativeTarget "HeapSortTests" */; | ||
buildPhases = ( | ||
7B1BFA4C1C69158D0051C9A4 /* Sources */, | ||
7B1BFA4D1C69158D0051C9A4 /* Frameworks */, | ||
7B1BFA4E1C69158D0051C9A4 /* Resources */, | ||
); | ||
buildRules = ( | ||
); | ||
dependencies = ( | ||
7B1BFA521C69158D0051C9A4 /* PBXTargetDependency */, | ||
); | ||
name = HeapSortTests; | ||
productName = HeapSortTests; | ||
productReference = 7B1BFA501C69158D0051C9A4 /* HeapSortTests.xctest */; | ||
productType = "com.apple.product-type.bundle.unit-test"; | ||
}; | ||
/* End PBXNativeTarget section */ | ||
|
||
/* Begin PBXProject section */ | ||
7B1BFA391C69158D0051C9A4 /* Project object */ = { | ||
isa = PBXProject; | ||
attributes = { | ||
LastSwiftUpdateCheck = 0720; | ||
LastUpgradeCheck = 0720; | ||
ORGANIZATIONNAME = "Swift Algorithm Club"; | ||
TargetAttributes = { | ||
7B1BFA401C69158D0051C9A4 = { | ||
CreatedOnToolsVersion = 7.2; | ||
}; | ||
7B1BFA4F1C69158D0051C9A4 = { | ||
CreatedOnToolsVersion = 7.2; | ||
TestTargetID = 7B1BFA401C69158D0051C9A4; | ||
}; | ||
}; | ||
}; | ||
buildConfigurationList = 7B1BFA3C1C69158D0051C9A4 /* Build configuration list for PBXProject "HeapSort" */; | ||
compatibilityVersion = "Xcode 3.2"; | ||
developmentRegion = English; | ||
hasScannedForEncodings = 0; | ||
knownRegions = ( | ||
en, | ||
Base, | ||
); | ||
mainGroup = 7B1BFA381C69158D0051C9A4; | ||
productRefGroup = 7B1BFA421C69158D0051C9A4 /* Products */; | ||
projectDirPath = ""; | ||
projectRoot = ""; | ||
targets = ( | ||
7B1BFA401C69158D0051C9A4 /* HeapSort */, | ||
7B1BFA4F1C69158D0051C9A4 /* HeapSortTests */, | ||
); | ||
}; | ||
/* End PBXProject section */ | ||
|
||
/* Begin PBXResourcesBuildPhase section */ | ||
7B1BFA3F1C69158D0051C9A4 /* Resources */ = { | ||
isa = PBXResourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
7B1BFA471C69158D0051C9A4 /* Assets.xcassets in Resources */, | ||
7B1BFA4A1C69158D0051C9A4 /* MainMenu.xib in Resources */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
7B1BFA4E1C69158D0051C9A4 /* Resources */ = { | ||
isa = PBXResourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXResourcesBuildPhase section */ | ||
|
||
/* Begin PBXSourcesBuildPhase section */ | ||
7B1BFA3D1C69158D0051C9A4 /* Sources */ = { | ||
isa = PBXSourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
7B1BFA621C6915A70051C9A4 /* Heap.swift in Sources */, | ||
7B1BFA451C69158D0051C9A4 /* AppDelegate.swift in Sources */, | ||
7B1BFA601C69159D0051C9A4 /* HeapSort.swift in Sources */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
7B1BFA4C1C69158D0051C9A4 /* Sources */ = { | ||
isa = PBXSourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
7B1BFA551C69158D0051C9A4 /* HeapSortTests.swift in Sources */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXSourcesBuildPhase section */ | ||
|
||
/* Begin PBXTargetDependency section */ | ||
7B1BFA521C69158D0051C9A4 /* PBXTargetDependency */ = { | ||
isa = PBXTargetDependency; | ||
target = 7B1BFA401C69158D0051C9A4 /* HeapSort */; | ||
targetProxy = 7B1BFA511C69158D0051C9A4 /* PBXContainerItemProxy */; | ||
}; | ||
/* End PBXTargetDependency section */ | ||
|
||
/* Begin PBXVariantGroup section */ | ||
7B1BFA481C69158D0051C9A4 /* MainMenu.xib */ = { | ||
isa = PBXVariantGroup; | ||
children = ( | ||
7B1BFA491C69158D0051C9A4 /* Base */, | ||
); | ||
name = MainMenu.xib; | ||
sourceTree = "<group>"; | ||
}; | ||
/* End PBXVariantGroup section */ | ||
|
||
/* Begin XCBuildConfiguration section */ | ||
7B1BFA571C69158D0051C9A4 /* Debug */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ALWAYS_SEARCH_USER_PATHS = NO; | ||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
CLANG_CXX_LIBRARY = "libc++"; | ||
CLANG_ENABLE_MODULES = YES; | ||
CLANG_ENABLE_OBJC_ARC = YES; | ||
CLANG_WARN_BOOL_CONVERSION = YES; | ||
CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
CLANG_WARN_EMPTY_BODY = YES; | ||
CLANG_WARN_ENUM_CONVERSION = YES; | ||
CLANG_WARN_INT_CONVERSION = YES; | ||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
CLANG_WARN_UNREACHABLE_CODE = YES; | ||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
CODE_SIGN_IDENTITY = "-"; | ||
COPY_PHASE_STRIP = NO; | ||
DEBUG_INFORMATION_FORMAT = dwarf; | ||
ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
ENABLE_TESTABILITY = YES; | ||
GCC_C_LANGUAGE_STANDARD = gnu99; | ||
GCC_DYNAMIC_NO_PIC = NO; | ||
GCC_NO_COMMON_BLOCKS = YES; | ||
GCC_OPTIMIZATION_LEVEL = 0; | ||
GCC_PREPROCESSOR_DEFINITIONS = ( | ||
"DEBUG=1", | ||
"$(inherited)", | ||
); | ||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
GCC_WARN_UNUSED_FUNCTION = YES; | ||
GCC_WARN_UNUSED_VARIABLE = YES; | ||
MACOSX_DEPLOYMENT_TARGET = 10.11; | ||
MTL_ENABLE_DEBUG_INFO = YES; | ||
ONLY_ACTIVE_ARCH = YES; | ||
SDKROOT = macosx; | ||
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
}; | ||
name = Debug; | ||
}; | ||
7B1BFA581C69158D0051C9A4 /* Release */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ALWAYS_SEARCH_USER_PATHS = NO; | ||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
CLANG_CXX_LIBRARY = "libc++"; | ||
CLANG_ENABLE_MODULES = YES; | ||
CLANG_ENABLE_OBJC_ARC = YES; | ||
CLANG_WARN_BOOL_CONVERSION = YES; | ||
CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
CLANG_WARN_EMPTY_BODY = YES; | ||
CLANG_WARN_ENUM_CONVERSION = YES; | ||
CLANG_WARN_INT_CONVERSION = YES; | ||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
CLANG_WARN_UNREACHABLE_CODE = YES; | ||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
CODE_SIGN_IDENTITY = "-"; | ||
COPY_PHASE_STRIP = NO; | ||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
ENABLE_NS_ASSERTIONS = NO; | ||
ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
GCC_C_LANGUAGE_STANDARD = gnu99; | ||
GCC_NO_COMMON_BLOCKS = YES; | ||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
GCC_WARN_UNUSED_FUNCTION = YES; | ||
GCC_WARN_UNUSED_VARIABLE = YES; | ||
MACOSX_DEPLOYMENT_TARGET = 10.11; | ||
MTL_ENABLE_DEBUG_INFO = NO; | ||
SDKROOT = macosx; | ||
}; | ||
name = Release; | ||
}; | ||
7B1BFA5A1C69158D0051C9A4 /* Debug */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
COMBINE_HIDPI_IMAGES = YES; | ||
INFOPLIST_FILE = HeapSort/Info.plist; | ||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; | ||
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.HeapSort; | ||
PRODUCT_NAME = "$(TARGET_NAME)"; | ||
}; | ||
name = Debug; | ||
}; | ||
7B1BFA5B1C69158D0051C9A4 /* Release */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
COMBINE_HIDPI_IMAGES = YES; | ||
INFOPLIST_FILE = HeapSort/Info.plist; | ||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; | ||
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.HeapSort; | ||
PRODUCT_NAME = "$(TARGET_NAME)"; | ||
}; | ||
name = Release; | ||
}; | ||
7B1BFA5D1C69158D0051C9A4 /* Debug */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
BUNDLE_LOADER = "$(TEST_HOST)"; | ||
COMBINE_HIDPI_IMAGES = YES; | ||
INFOPLIST_FILE = HeapSortTests/Info.plist; | ||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; | ||
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.HeapSortTests; | ||
PRODUCT_NAME = "$(TARGET_NAME)"; | ||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HeapSort.app/Contents/MacOS/HeapSort"; | ||
}; | ||
name = Debug; | ||
}; | ||
7B1BFA5E1C69158D0051C9A4 /* Release */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
BUNDLE_LOADER = "$(TEST_HOST)"; | ||
COMBINE_HIDPI_IMAGES = YES; | ||
INFOPLIST_FILE = HeapSortTests/Info.plist; | ||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; | ||
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.HeapSortTests; | ||
PRODUCT_NAME = "$(TARGET_NAME)"; | ||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HeapSort.app/Contents/MacOS/HeapSort"; | ||
}; | ||
name = Release; | ||
}; | ||
/* End XCBuildConfiguration section */ | ||
|
||
/* Begin XCConfigurationList section */ | ||
7B1BFA3C1C69158D0051C9A4 /* Build configuration list for PBXProject "HeapSort" */ = { | ||
isa = XCConfigurationList; | ||
buildConfigurations = ( | ||
7B1BFA571C69158D0051C9A4 /* Debug */, | ||
7B1BFA581C69158D0051C9A4 /* Release */, | ||
); | ||
defaultConfigurationIsVisible = 0; | ||
defaultConfigurationName = Release; | ||
}; | ||
7B1BFA591C69158D0051C9A4 /* Build configuration list for PBXNativeTarget "HeapSort" */ = { | ||
isa = XCConfigurationList; | ||
buildConfigurations = ( | ||
7B1BFA5A1C69158D0051C9A4 /* Debug */, | ||
7B1BFA5B1C69158D0051C9A4 /* Release */, | ||
); | ||
defaultConfigurationIsVisible = 0; | ||
defaultConfigurationName = Release; | ||
}; | ||
7B1BFA5C1C69158D0051C9A4 /* Build configuration list for PBXNativeTarget "HeapSortTests" */ = { | ||
isa = XCConfigurationList; | ||
buildConfigurations = ( | ||
7B1BFA5D1C69158D0051C9A4 /* Debug */, | ||
7B1BFA5E1C69158D0051C9A4 /* Release */, | ||
); | ||
defaultConfigurationIsVisible = 0; | ||
defaultConfigurationName = Release; | ||
}; | ||
/* End XCConfigurationList section */ | ||
}; | ||
rootObject = 7B1BFA391C69158D0051C9A4 /* Project object */; | ||
} |
Oops, something went wrong.