
leetcode
王后溪
这个作者很懒,什么都没留下…
展开
-
leetcode -easy- 1108. Defanging an IP Address【Python】
问题:Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period “.” with “[.]”. 我的思路是用split(".")分割str, 再用 + “[.]” 拼接: class Solution(objec...原创 2019-08-20 10:28:30 · 257 阅读 · 0 评论 -
leetcode -easy- 771. Jewels and Stones [Python]
You’re given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of the st...原创 2019-08-20 10:44:14 · 143 阅读 · 0 评论 -
leetcode -easy- 1. Two Sum [Python]
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same ...原创 2019-08-20 17:50:51 · 152 阅读 · 0 评论