BCA2020 -DATA STRUCTURE AND ALGORITHM

Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601


ASSIGNMENT

PROGRAM
BCA(REVISED FALL 2012)
SEMESTER
2
SUBJECT CODE & NAME
BCA2020 -DATA STRUCTURE AND ALGORITHM
CREDIT
4
BK ID
B1640
MAX.MARKS
60

Note: Answer all questions. Kindly note that answers for 10 marks questions should be approximately of 400 words. Each question is followed by evaluation scheme.


1. Briefly explain about memory allocation and garbage collection.

Answer: Dynamically Allocated Data Structures

Dynamicly created data structures like trees, linked lists and hash tables (which can be implemented as arrays of linked lists) are key to the construction of many large software systems. For example, a compiler for a programming language will maintain symbol tables and type information which is dynamically constructed by reading the source program. Many modern compilers also read the source program (e.g., parse it) and translate it into an internal tree form (commonly called an abstract syntax tree) that is also dynamically created. Graphics



2. Briefly explain basic concepts of Graphs.

Answer: Check the data

This should be obvious. Data forms the foundation of charts and graphs. If your data is weak, your graph is weak, so make sure it makes sense. Start with some simple graphs to see if there are any outliers or weird spikes. Verify anything that doesn't make sense. You might be surprised how many data entry typos you find in the spreadsheets people send you.
Explain encodings




3. What is queue? Briefly explain array implementation of queue.

Answer: A queue is a particular kind of abstract data type or collection in which the entities in the collection are kept in order and the principal (or only) operations on the collection are the addition of entities to the rear terminal position, known as enqueue, and removal of entities from the front terminal position, known as dequeue. This makes the queue a First-In-First-Out (FIFO) data structure. Queues provide services in computer science, transport, and operations research where various entities such as data, objects, persons, or events are stored and held to be processed later. In these contexts, the queue performs the function of a buffer.

Queues are common in computer programs, where they



4 Write a short note on: NP-Completeness and Optimization versus decision problems.

Answer: NP-Completeness: NP-completeness is a form of bad news: evidence that many important problems can't be solved quickly.
 These NP-complete problems really come up all the time. Knowing they're hard lets you stop beating your head against a wall trying to solve them, and do something better:
·         Use a heuristic. If you can't quickly solve the problem with a good worst case time, maybe you can come up with a method for solving a reasonable fraction of the common cases.
·         Solve the problem approximately instead of exactly. A lot of the time it is possible to come up with a provably fast algorithm, that doesn't solve the problem exactly but comes up with a solution you can prove is close to right.





5. Briefly explain the Binary search Method.

Answer: Binary search is one of the fundamental algorithms in computer science. In order to explore it, we’ll first build up a theoretical backbone, then use that to implement the algorithm properly and avoid those nasty off-by-one errors everyone’s been talking about.

Finding a value in a sorted sequence
In its simplest form, binary search is used to quickly find a value in a sorted sequence (consider a sequence an ordinary array for now). We’ll call





6 Briefly explain Greedy Method Strategy.

Answer: The greedy method is a strategy to solve some optimization problems. Let us suppose that we can solve a problem by a sequence of decisions. The greedy method employs the following approach: In each stage, our decision is a locally optimal one. For some problem, as we shall see, these locally optimal solutions will finally add up to a globally optimal solution.
Let us now describe the spirit of greedy method by an example. Consider the case where we are given a set of n numbers and we are asked to pick out k numbers such that the sum of these k numbers is the largest, among all possible ways of picking out

Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.