ICP 9 - bhargavi1411/BigDataProgramming GitHub Wiki
Name : Bhargavi Saipoojitha Chennupati
Class ID : 4
Topic : Apache Spark
Task 1 :
Create a Map-Reduce Program to perform Merge-Sort Algorithm in Spark.
Merge Sort :
Merge Sort is a Divide and Conquer algorithm. It divides input array in two halves, calls itself for the two halves and then merges the two sorted halves.
Merge sort works as follows:
- Divide the unsorted list into n sublists, each containing one element (a list of one element is considered sorted).
- Repeatedly merge sublists to produce new sorted sublists until there is only one sublist remaining. This will be the sorted list.
Merge Sort Example :
Code Screenshots :
Output Screenshot :
Task 2 :
Implement Depth First Search in Graph in Apache Spark
Depth First Search :
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node, selecting some arbitrary node as the root node in the case of a graph and explores as far as possible along each branch before backtracking.