摘要:
请你来实现一个 atoi 函数,使其能将字符串转换成整数。(前两个我写的,效率不是很高) class Solution(object): def myAtoi1(self, s): """ :type s: str :rtype: int """ temp = s.strip() if not te 阅读全文
posted @ 2021-01-12 16:34
楠海
阅读(105)
评论(0)
推荐(0)
摘要:
给你一个整数数组 nums ,设计算法来打乱一个没有重复元素的数组。(这个我写的,但是我感觉用别人的随机算法是挺好,但是就是不知道原理) class Solution(object): def __init__(self, nums): """ :type nums: List[int] """ s 阅读全文
posted @ 2021-01-12 11:15
楠海
阅读(73)
评论(0)
推荐(0)

浙公网安备 33010602011771号