摘要:
题目:Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["25... 阅读全文
摘要:
题目: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a sin... 阅读全文
摘要:
题目: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stoppin... 阅读全文
摘要:
这题第一眼看到想到的是BFS。接着想到我需要一个queue来做BFS。之后,为了能一一对应的复制,还用到一个Map。对应新旧node。BUG: 就是我在复制新child node之前,就把旧child node添加到新的node的neighbors中了。 1 public Undirecte... 阅读全文