Skip to content

Instantly share code, notes, and snippets.

View programmerr47's full-sized avatar

Mikhail Spitsin programmerr47

  • Careem
  • Saint-Petersburg
View GitHub Profile
View SampleTest.kt
interface One {
val havePossibility: Boolean
fun invoke()
interface Two {
fun invoke()
class Sample(
programmerr47 / Depth-First-Iterator
Last active September 26, 2016 08:13
Iterator for "going" through tree by using DFS.
View Depth-First-Iterator
//sample Node.class of three
class Node {
Object data;
Node left;
Node right;
public boolean isLeaf() {
return left == null && right == null;