摘要:
Given an directed graph, a topological order of the graph nodes is defined as follow: For each directed edge A -> B in graph, A must appear before B i 阅读全文
摘要:
Given a linked list, determine if it has a cycle in it. Given a linked list, determine if it has a cycle in it. Given a linked list, determine if it h 阅读全文
摘要:
Merge two sorted (ascending) linked lists and return it as a new sorted list. The new sorted list should be made by splicing together the nodes of the 阅读全文
摘要:
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文
摘要:
Sort a linked list using insertion sort. Sort a linked list using insertion sort. Sort a linked list using insertion sort. Example Given 1->3->2->0->n 阅读全文
摘要:
Given a node from a cyclic linked list which has been sorted, write a function to insert a value into the list such that it remains a cyclic sorted li 阅读全文
摘要:
Given a Binary Tree, write a function to check whether the given Binary Tree is a prefect Binary Tree or not. A Binary tree is Perfect Binary Tree in 阅读全文
摘要:
Given a binary tree, you need to check whether sum of all covered elements is equal to sum of all uncovered elements or not. In a binary tree, a node 阅读全文
摘要:
Given an unsorted array of nonnegative integers, find a continous subarray which adds to a given number. Examples: There may be more than one subarray 阅读全文
摘要:
Given a binary tree, generate all root to leaf paths of a binary tree. Example: Example Tree The output for the above example is [[1, 2, 4], [1, 2, 5] 阅读全文