發表文章

目前顯示的是 2019的文章

[ Leetcode ] 31. Next Permutation

圖片
Implement  next permutation , which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order). The replacement must be  in-place  and use only constant extra memory. Here are some examples. Inputs are in the left-hand column and its corresponding outputs are in the right-hand column. 1,2,3  →  1,3,2 3,2,1  →  1,2,3 1,1,5  →  1,5,1 class Solution(object):     def nextPermutation(self, nums):         """         :type nums: List[int]         :rtype: None Do not return anything, modify nums in-place instead.         """         if not nums:             return nums                  first,...

[ Leetcode ] 456. 132 Pattern

圖片
456 .  132 Pattern one -> three -> twp patten - assume every number in the iteration is three. - use three to find the max two - if you find the two and three, and now there's a number small than two. then you got it. class Solution(object):     def find132pattern(self, nums):         """         :type nums: List[int]         :rtype: bool         """         st = []         two = float('-inf')         # assume every number in the iteration is three.         for i in range(len(nums) - 1, -1, -1):                          # if you find the two and three, and now there's a number small than two. then you got it.             if nums[i] < two:       ...

[2019] Live in Seoul

圖片
Stay in Seoul for a week, here is the postcard I like to add into my blog.

[Java] Leetcode : 1 Two Sum, 167. Two Sum II - Input array is sorted 15. 3Sum

圖片
Time O(n) O(n^2)

TDD and BDD?

reference from: https://www.zhihu.com/question/20161970  软件开发过程中最常见的两个问题 需求和开发脱节: 用户想要的功能没有开发 开发的功能并非用户想要 用户和开发人员所说语言不同 开发和测试脱节: 开发和测试被认为割裂 从开发到测试周期过长 测试自动化程度低 3. 如何解决上面说的两个问题 使用BDD可以解决需求和开发脱节的问题,首先他们都是从用户的需求出发,保证程序实现效果与用户需求一致。

What Will Be the Toughest Obstacles for Test Teams in 2019?

reference: https://abstracta.us/blog/software-testing/expert-roundup-software-testing-trends-2019/ What Tools or Methodologies Are You Excited to Und erstand Better This Year? Janet Gregory: “I’m not sure there is a new methodology around, but I’d like to  explore a bit more about quality and what it means to different teams . For example, there is a difference between product quality and quality of your process and many teams get confused in what they measure. Also, there are different points of view in how we perceive quality of our products. I’d like to find better words to help teams define what they mean.” Jeff Martin:  “The most exciting new solutions for me are not technical, but process based. Adopting  Behavior Driven Development  (BDD) has proven extremely helpful in focusing both development and testing resources on working together in a common language. This greatly cuts communication overhead and helps deliver on the promises of Agil...