自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

co-Ding Studio---科鼎工作室---博客

解析高新技术,不让任何人在信息时代落伍!

  • 博客(13)
  • 收藏
  • 关注

原创 SOSP论文dSpace: Composable Abstractions for Smart Spaces 总结

Paper review for dSpace paper from SOSP 2021

2023-02-13 12:58:25 147

原创 python 小贴士

import datetimetoday = datetime.date.today()# Result of __str__ should be readable:str(today)# output: '2017-02-02'# Result of __repr__ should be unambiguous:repr(today)# output: 'dateti...

2019-12-04 03:48:56 100

原创 [Lintcode 108] Palindrome Partitioning II

DescriptionGiven a string s, cut s into some substrings such that every substring is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.ExamplesExample 1:Input: “a”Ou...

2019-12-02 04:21:18 125

原创 [Lintcode 136] Palindrome Partitioning

DescriptionEnglishGiven a string s. Partition s such that every substring in the partition is a palindrome.Return all possible palindrome partitioning of s.ExamplesExample 1:Input: “a”Output: [...

2019-12-02 02:19:04 85

原创 [Lintcode 11] Search Range in Binary Search Tree

DescriptionGiven a binary search tree and a range [k1, k2], return node values within a given range in ascending order. (https://www.lintcode.com/problem/search-range-in-binary-search-tree/descriptio...

2019-11-27 10:03:15 124

原创 python itertools

# itertools.permutations() 可以用来获取可迭代型数据的全排列# 一个使用的例子是暴力破解密码import itertoolsfor p in itertools.permutations('ABCD'): print(p)('A', 'B', 'C', 'D')('A', 'B', 'D', 'C')('A', 'C', 'B', 'D')('A', ...

2019-11-25 01:06:25 136

原创 heap

def heapify(arr, n, i):largest = i # Initialize largest as rootl = 2 * i + 1 # left = 2i + 1r = 2 * i + 2 # right = 2i + 2# See if left child of root exists and is # greater than root if...

2019-08-30 02:41:18 78

原创 Sorting

iterates through array swapping elements to find the smallest.def bubbleSort(arr):n = len(arr)for i in range(n):for j in range(0, n-i-1):if arr[j] > arr[j+1] :arr[j], arr[j+1] = arr[j+1], arr...

2019-08-29 15:18:28 98

原创 BFS and DFS

Breath First Search (BFS)def bfs(self, s): visited = [False] * (len(self.graph)) queue = [] queue.append(s) visited[s] = True while queue: # Dequeue a vertex from # queu...

2019-08-29 15:17:05 156

原创 Fine-grained Metadata Journaling on NVM 总结

Fine-grained Metadata Journaling on NVMPaper link:http://storageconference.us/2016/Papers/Fine-GrainedJournaling.pdfBelow are some key points that are worth mentioning:Updating data larger than ...

2019-08-27 02:13:22 189

原创 880. Decoded String at Index

比如,对于一个解码了的字符串 hello5,并且要求的索引K=18的话,那么结果和K=3是一样的。因为单词hello的size=5,并且被重复了5次。所以第K个字符和第mod(K, size)个字符是相同的。代码如下:class Solution(object): def decodeAtIndex(self, S, K): """ :type...

2019-07-03 10:28:46 140

原创 Leetcode -- Backtracking

Gray codeclass Solution(object): def grayCode(self, n): """ :type n: int :rtype: List[int] """ def helper(i, arr): if i == -1: ...

2019-05-06 03:04:48 65

原创 Leetcode 动态规划解析 (1)

Leetcode – House Robber 解析题目链接:https://leetcode.com/problems/house-robber/答案class Solution(object): def rob(self, nums): """ :type nums: List[int] :rtype: int "...

2019-05-05 03:26:40 106

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除