Arithmatic operations broadcast unlike tuples
>>> complex(1,1) + complex(2,-2)
(3-1j)
Use index/find on list or string
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
package com.f2prateek.five00px.data.api.auth; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.Map; | |
import oauth.signpost.http.HttpRequest; | |
import retrofit.client.Header; | |
import retrofit.client.Request; |
Class Main { | |
public void bfs() | |
{ | |
// BFS uses Queue data structure | |
Queue queue = new LinkedList(); | |
queue.add(this.rootNode); | |
printNode(this.rootNode); | |
rootNode.visited = true; | |
while(!queue.isEmpty()) { | |
Node node = (Node)queue.remove(); |