public class MainActivity
extends AppCompatActivity {
RecyclerView recyclerView;
String text[]
= { "Linear Search", "Binary Search", "Selection Sort",
"Bubble Sort", "Insertion Sort",
"Recursive Insertion Sort", "Merge Sort",
"Iterative Merge Sort", "Quick Sort",
"Heap Sort", "Counting Sort",
"Klee’s Algorithm", "Karatsuba algorithm",
"Dijkstra’s Shortest Path Algorithm",
"Dial’s Algorithm",
"Kruskal’s Minimum Spanning Tree",
"Prim’s Minimum Spanning Tree",
"Naive Pattern Searching",
"KMP Algorithm", "Rabin-Karp Algorithm" };
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
recyclerView = findViewById(R.id.recycler_view);
MyAdapter adapter = new MyAdapter(this, text);
recyclerView.setLayoutManager(
new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
}
}