0% found this document useful (0 votes)
2 views1 page

DAA Java Viva Guide

The document provides a comprehensive guide on Java concepts and Data Structures and Algorithms (DAA). It covers key topics such as classes, objects, sorting algorithms, graph traversal methods, minimum spanning trees, dynamic programming, backtracking, and string matching techniques. Additionally, it includes common viva questions related to these topics.

Uploaded by

r85006501
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

DAA Java Viva Guide

The document provides a comprehensive guide on Java concepts and Data Structures and Algorithms (DAA). It covers key topics such as classes, objects, sorting algorithms, graph traversal methods, minimum spanning trees, dynamic programming, backtracking, and string matching techniques. Additionally, it includes common viva questions related to these topics.

Uploaded by

r85006501
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DAA + Java Viva Complete Guide

Java Concepts

Class: Blueprint for objects.

Object: Instance of class, created using new keyword.

Static vs Non-static: Static belongs to class, non-static requires object.

DAA Basics

Algorithm: Finite steps to solve problem.

Time Complexity: O(n), O(log n), O(n log n)

Space Complexity: Memory usage.

Sorting

Merge Sort: O(n log n), stable, extra space.

Quick Sort: Avg O(n log n), worst O(n^2), in-place.

Heap Sort: O(n log n), no extra space.

Graphs

BFS: Queue, O(V+E)

DFS: Stack/recursion

Topological Sort: DAG, O(V+E)

MST

Prim: Greedy, O(V^2)

Kruskal: Uses union-find, O(E log E)

DP

Knapsack: O(nW)

TSP: O(n^2 * 2^n)

Backtracking

N Queens: Exponential

String Matching

Horspool: Uses shift table

Common Viva Questions

Why QuickSort is fast? Cache efficiency.

Prim vs Kruskal difference.

Why BFS gives shortest path.

You might also like