Week10 (May 20)

260. Single Number III

Question

Given an integer array nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. You can return the answer in any order.

You must write an algorithm that runs in linear runtime complexity and uses only constant extra space.

Hand in homework before Saturday.

Roger的作業
xander的作業
Stephen的作業
Continue filling by yourself

797. All Paths From Source to Target

Question

Given a directed acyclic graph (DAG) of

n nodes labeled from
0
to
n1
, find all possible paths from node
0
to node
n1
and return them in any order.

The graph is given as follows:

graph[i] is a list of all nodes you can visit from node
i
(i.e., there is a directed edge from node
i
to node
graph[i][j]
).

Hand in homework before Saturday.

Roger的作業
xander的作業
Continue filling by yourself