Posts

Showing posts from October, 2021

ADA For GTU

 Greedy Algorithm  A greedy algorithm, as the name suggests,  always makes the choice that seems to be the best at that moment .  It chooses the “locally optimal solution”, without thinking about future consequences.  Greedy algorithms may not always lead to the optimal global solution, because The choice made by the greedy approach does not consider the future data and choices.

Dynamic Programming ADA

 Dynamic Programming -  Dynamic programming approach is similar to divide and conquer in breaking down the problem into smaller and yet smaller possible sub-problems. But unlike, divide and conquer, these sub-problems are not solved independently. Rather, results of these smaller sub-problems are remembered and used for similar or overlapping sub-problems. Dynamic programming is used where we have problems, which can be divided into similar sub-problems, so that their results can be re-used. Mostly, these algorithms are used for optimization. Before solving the in-hand sub-problem, dynamic algorithm will try to examine the results of the previously solved sub-problems. The solutions of sub-problems are combined in order to achieve the best solution.

sem 5 PDS

python , javascript, R ,SQL This graph represents the minimum, maximum, median, first quartile and third quartile in the data set   python   introduction of python  open source, interpreted, high level , general purpose programming language. easiest to learn and nicest to use fewer lines of code compare to other languages Advantages  easy syntax  readability  high level language  its free and open source  cross platform widely supported  its safe huge amount of additional open source library  data stuctures in python - List - list is data structure that holds ordered collection of item. tuple - tuple is imutable ordered sequence of zero or more objects . it allows dublicate values like list set- is a muteble data structure that holds unordered collection of unique items. {} directory - is unordered collection of zero or more key-value pair . its mutable  Data Science - it is branch of computer science where we study how to store , use and analyze data for deriving information from it .