摘要:
题目: Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be i 阅读全文
posted @ 2017-07-31 21:48
荒野第一快递员
阅读(245)
评论(0)
推荐(0)
摘要:
题目: Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation -- 阅读全文
posted @ 2017-07-31 20:20
荒野第一快递员
阅读(349)
评论(0)
推荐(0)
摘要:
题目: Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. 题意及分析:实现一个 阅读全文
posted @ 2017-07-31 19:09
荒野第一快递员
阅读(249)
评论(0)
推荐(0)
摘要:
题目: Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). G 阅读全文
posted @ 2017-07-31 15:05
荒野第一快递员
阅读(414)
评论(0)
推荐(0)
摘要:
一、图的分类 1、无向图:边没有方向的图称为无向图。如<A,B>和<B,A>等价。下图是一个无向图,及其邻接链表和邻接矩阵的表示。 2、有向图: 边是有方向性的,例如一条边有两个顶点A,B,A和B顶点之间,A指向了B,B也指向了A,两者是不同的,如果给边赋予权重,那么这种异同便更加显著了。下图是一个 阅读全文
posted @ 2017-07-31 11:44
荒野第一快递员
阅读(322)
评论(0)
推荐(0)

浙公网安备 33010602011771号