Data Structures & Algorithm

Data Structures & Algorithms are fundamental concepts in computer science that deal with organizing, storing, and manipulating data efficiently. Data structures (e.g., arrays, linked lists, trees, graphs) provide ways to manage and access data, while algorithms are step-by-step procedures for solving problems or performing computations (e.g., sorting, searching, optimization). Together, they form the backbone of software development, enabling efficient problem-solving, performance optimization, and scalable solutions in programming and real-world applications.

40 questions and answers

991 views

What is a priority queue ?

Priority queue is an abstract data type which is like a regular queue or stack data structure, but where additionally each element has a "priority" associated with it.

Demo Teacher
added 2 years ago
1362 views

Write the recursive algorithm to find x^ n.

float power(float x, int n) { if(x=0)

Demo Teacher
added 2 years ago
1263 views

What is a self referential structure? What is difference between Union & Structure?

A structure may have a member whose is same as that of a structure itself. Such structures are called self-referential.

Demo Teacher
added 2 years ago
1110 views

Write short notes on the following :

      a)   BFS

      b)   Tail recursion

Breadth-first search is a way to find all the vertices reachable from the a given source vertex, s. Like depth first search, BFS traverse a connected component of a given graph and defines a spanning tree.

Demo Teacher
added 2 years ago
987 views

What are the difference between linear and non-linear data structure?

Main difference between linear and non-linear data structures lie in the way they organize data elements.

Demo Teacher
added 2 years ago
1125 views

Discuss the differences between command file and executable file.

Both files are commonly found in a program’s root installation directory and both run programs when opened. Often, they even have the same Windows icon. To the average user, .BAT and .EXE files appear nearly identical.

Demo Teacher
added 2 years ago
36 views

In which cases, QuickSort becomes a ‘SlowSort’ ? What Is the remedy In those cases? 

There are few cases for which QuickSort becomes "Slowsort", with complexity of O(n2). Consider, for example, what happens if the value picked each time as the partitioning value happens to be the largest,

Demo Teacher
added 2 years ago