当元素没有id,没有name,没有任何,只有一个class的时候,应该如何去定位这个元素1、页面存在多个div,使用find_elements_by_tag_name("div")[x] 这种方法可以使用,但是要去数第几个div,太坑2、使用find_element_by_class_name(.....
分类:
编程语言 时间:
2015-11-07 10:46:26
阅读次数:
269
题目寻找缺失的数 给出一个包含 0 ..N中N个数的序列,找出0 ..N中没有出现在序列中的那个数。样例N=4且序列为[0, 1, 3]时,缺失的数为2。注意可以改变序列中数的位置。挑战在数组上原地完成,使用O(1)的额外空间和O(N)的时间。解题重新定义一个数组存放排序后的数,空间复杂度和时间复杂...
分类:
其他好文 时间:
2015-11-06 22:24:28
阅读次数:
263
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.For example, given n = 12, return 3 because 12 = 4 + 4 + 4; given n = 13, retu...
分类:
其他好文 时间:
2015-11-06 21:05:22
阅读次数:
227
题目链接:https://leetcode.com/problems/median-of-two-sorted-arrays/
题目:There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall ru...
分类:
其他好文 时间:
2015-11-06 09:46:52
阅读次数:
234
Given a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of sequentially adjac...
分类:
其他好文 时间:
2015-11-06 01:38:08
阅读次数:
296
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace...
分类:
其他好文 时间:
2015-11-05 23:58:27
阅读次数:
336
题目描述:(链接)Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be i...
分类:
其他好文 时间:
2015-11-05 23:50:51
阅读次数:
193
1 Two Sum Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of...
分类:
其他好文 时间:
2015-11-05 22:15:12
阅读次数:
254
题意:给一个整数n,求一个不超过100个数字的只由01组成的非0十进制整数是n的倍数。解法:dp。考虑dp[i][j]表示i个数组成的数modn为j的可能性,则有状态转移方程:foreach dp[i][j]:dp[i + 1][j × 10 % n] = 1, dp[i + 1][(j × 10 ...
分类:
其他好文 时间:
2015-11-05 22:05:20
阅读次数:
236
题目链接:https://leetcode.com/problems/longest-palindromic-substring/题目:Given a stringS, find the longest palindromic substring inS. You may assume that t...
分类:
其他好文 时间:
2015-11-05 21:57:51
阅读次数:
219