• 首页
  • 归档
  • 工具
  • 关于
  • 归档
    工具
    关于
Swift.快速排序

Swift.快速排序

import Foundation class QuickSortSolution { func sort(_ n: [Int]) -> [Int] { var s = n quickSort(&s, 0, n.count - 1) return s } func quickSort(_ n: inout [Int],_ left: Int,_ right: Int) { if left < right { let mid = ...

 LeetCode  2015-05-22 PM  441℃  0条
Swift.归并排序

Swift.归并排序

import Foundation class MergeSortSolution { func sort(_ n: [Int]) -> [Int] { var s = n sortArray(&s, 0, n.count - 1) return s } func sortArray(_ n: inout [Int],_ left: Int,_ right: Int){ if left < right { let mid = (...

 LeetCode  2015-05-21 PM  551℃  0条
Swift.直接插入排序

Swift.直接插入排序

import Foundation class InsertSortSolution { func sort(_ n: [Int]) -> [Int] { var nums = n for i in 0..<nums.count { var j = i while j-1>=0 && nums[j] < nums[j-1] { let temp = nums[j] nums[j...

 LeetCode  2015-05-19 PM  482℃  0条
Swift.堆排序

Swift.堆排序

import Foundation class HeapSortSolution { func sort(_ n: [Int]) -> [Int] { var s = n //1.初始化堆 var i = n.count/2 - 1 while i >= 0 { heapAdjust(&s, i, n.count - 1) i -= 1 } var j = n.c...

 LeetCode  2015-05-14 PM  461℃  0条
Swift.二叉树的后序遍历

Swift.二叉树的后序遍历

import Foundation extension MyTreeNodeSolution { //递归 func postOrderTraversal(_ root: TreeNode?,_ n: inout [Int]) { if root == nil { return } postOrderTraversal(root?.left, &n) postOrderTraversal(root?.right, &n) n...

 LeetCode  2015-05-14 PM  724℃  0条
«1...131415»

 栏目分类

  •  iOS开发
  •  Flutter开发
  •  逆向学习
  •  LeetCode
  •  数码改造

标签云

源码FlutterBuildContextCentos逆向自动化字符串操作LeetCodeisaiOSSSHGETgithub算法iOS开发算法思想改造ListViewNSCachePOSTSiwftOpenSSHHTTPDockerfrida

友情链接

objc期刊 swift期刊 flutter文档
© 2025 Powered by Typecho Theme by Echo
本站已稳定运行2376天16小时28分