码迷,mamicode.com
首页 >  
搜索关键字:element traversal    ( 13647个结果
浏览器兼容性小记-DOM篇(二)
1、DOM中的所有节点都继承自Node类型,IE9之前将DOM节点作为COM对象来实现;每个DOM节点都有一个nodeType属性来表明节点类型,总共有12个类型: 1 Node.ELEMENT_NODE 2 Node.ATTRIBUTE_NODE 3 Node.TEXT_NODE 4 Node.C...
分类:其他好文   时间:2014-05-20 00:53:25    阅读次数:297
Best Time to Buy and Sell Stock I && II && III
题目1:Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie,...
分类:其他好文   时间:2014-05-16 01:46:15    阅读次数:460
Binary Tree Zigzag Level Order Traversal
原题: 题目解析:这个问题的实质是要我们按成访问二叉树的结点,并返回每层访问的结果,这里要求走Z字,其实就是一行正向一行反向。 /* the kernel idea is visit a binary search tree in level and the additional work we have to label the end of one level. */ v...
分类:其他好文   时间:2014-05-15 23:18:46    阅读次数:515
<译>Selenium Python Bindings 4 - Locating Eelements
有各种不同的策略来定位页面中的元素。你可以使用最合适定位方式用于你的用例。Selenium提供了以下方法来定位页面中的元素:find_element_by_idfind_element_by_namefind_element_by_xpathfind_element_by_link_textfi.....
分类:编程语言   时间:2014-05-15 17:28:48    阅读次数:430
CareerCup之1.7 Set Matrix Zeroes
【题目】 原文: 1.7 Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0. 译文: 写一个函数处理一个MxN的矩阵,如果矩阵中某个元素为0,那么把它所在的行和列都置为0. 【分析】 【思路一】 遍历一次矩阵...
分类:其他好文   时间:2014-05-15 12:27:37    阅读次数:293
LeetCode--Single Number II
Single Number II  Total Accepted: 14472 Total Submissions: 44420My Submissions Given an array of integers, every element appears three times except for one. Find that single one. Note: Y...
分类:其他好文   时间:2014-05-15 01:23:42    阅读次数:273
LeetCode 010 Regular Expression Matching
【题目】 Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). The function prototype shoul...
分类:其他好文   时间:2014-05-14 21:36:52    阅读次数:348
Leetcode 线性表 Remove Element
题意:移除数组中出现的给定元素,并返回移除元素数组长度。要求在数组上操作 思路:遍历数组,将除给定元素外的其他元素赋值给“新数组”,不过这个“新数组”还是在原来的“旧数组”的内存空间 因为遍历旧数组的下标总大于等于新数组的下标,所以赋值并不会影响到还没有遍历到的元素 复杂度:时间O(n), 空间O(1)...
分类:其他好文   时间:2014-05-14 21:35:52    阅读次数:257
LeetCode--Binary Tree Preorder Traversal
Binary Tree Preorder Traversal  Total Accepted: 18022 Total Submissions: 51784My Submissions Given a binary tree, return the preorder traversal of its nodes' values. For example: Given b...
分类:其他好文   时间:2014-05-14 20:43:22    阅读次数:242
Best Time to Buy and Sell Stock III
Total Accepted: 8400 Total Submissions: 38235 My Submissions Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profi...
分类:其他好文   时间:2014-05-14 19:39:53    阅读次数:275
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!