Clone a graph. Input is a Node pointer. Return the Node pointer of the cloned graph.
A graph is defined below:
struct Node {
@@ -34,4 +34,4 @@ Node *clone(Node *graph) {
}
return graphCopy;
-}
anlysis
using the Breadth-first traversal and use a map to save the neighbors not to be duplicated.
\ No newline at end of file
+}
anlysis
using the Breadth-first traversal and use a map to save the neighbors not to be duplicated.
\ No newline at end of file
diff --git a/2017/04/25/rabbitmq-tips/index.html b/2017/04/25/rabbitmq-tips/index.html
index 37a8020328..dff8d8e5b7 100644
--- a/2017/04/25/rabbitmq-tips/index.html
+++ b/2017/04/25/rabbitmq-tips/index.html
@@ -1,4 +1,4 @@
-rabbitmq-tips | Nicksxs's Blog
Cluster status of node rabbit@rabbit1 ...
[{nodes,[{disc,[rabbit@rabbit1,rabbit@rabbit2,rabbit@rabbit3]}]},
{running_nodes,[rabbit@rabbit2,rabbit@rabbit1]}]...done.
这里碰到过一个坑,对于使用exchange来做消息路由的,会有一个情况,就是在routing_key没被订阅的时候,会将该条找不到路由对应的queue的消息丢掉What happens if we break our contract and send a message with one or four words, like "orange" or "quick.orange.male.rabbit"? Well, these messages won't match any bindings and will be lost.对应链接,而当使用空的exchange时,会保留消息,当出现消费者的时候就可以将收到之前生产者所推送的消息对应链接,这里就是用了空的exchange。
这里碰到过一个坑,对于使用exchange来做消息路由的,会有一个情况,就是在routing_key没被订阅的时候,会将该条找不到路由对应的queue的消息丢掉What happens if we break our contract and send a message with one or four words, like "orange" or "quick.orange.male.rabbit"? Well, these messages won't match any bindings and will be lost.对应链接,而当使用空的exchange时,会保留消息,当出现消费者的时候就可以将收到之前生产者所推送的消息对应链接,这里就是用了空的exchange。
\ No newline at end of file
diff --git a/2020/06/26/聊一下-RocketMQ-的-Consumer/index.html b/2020/06/26/聊一下-RocketMQ-的-Consumer/index.html
index 1a4dc82618..34837fecac 100644
--- a/2020/06/26/聊一下-RocketMQ-的-Consumer/index.html
+++ b/2020/06/26/聊一下-RocketMQ-的-Consumer/index.html
@@ -1,4 +1,4 @@
-聊一下 RocketMQ 的 DefaultMQPushConsumer 源码 | Nicksxs's Blog
public static void main(String[] args) throws InterruptedException, MQClientException {
/*
* Instantiate with specified consumer group name.
@@ -737,4 +737,4 @@
throw new RemotingTimeoutException(info);
}
}
- }
\ No newline at end of file
+ }
\ No newline at end of file
diff --git a/2020/07/05/聊一下-RocketMQ-的-NameServer-源码/index.html b/2020/07/05/聊一下-RocketMQ-的-NameServer-源码/index.html
index f29b663824..ff7390496f 100644
--- a/2020/07/05/聊一下-RocketMQ-的-NameServer-源码/index.html
+++ b/2020/07/05/聊一下-RocketMQ-的-NameServer-源码/index.html
@@ -1,4 +1,4 @@
-聊一下 RocketMQ 的 NameServer 源码 | Nicksxs's Blog
publicstaticvoidmain(String[] args){main0(args);}
@@ -563,4 +563,4 @@
response.setRemark("No topic route info in name server for the topic: "+ requestHeader.getTopic()+FAQUrl.suggestTodo(FAQUrl.APPLY_TOPIC_URL));return response;
- }