0% found this document useful (0 votes)
61 views7 pages

Al 101 Faith Biag

The document discusses algorithms, data structures, and algorithm complexity. It defines an algorithm as a detailed sequence of instructions to solve a problem, and a data structure as a format to organize data. Algorithm complexity is determined by how much time and space an algorithm takes based on input size. Computational complexity is important for choosing effective algorithms as problems increase in size and complexity. Learning algorithms is important because algorithms are used in many daily tasks.

Uploaded by

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

Al 101 Faith Biag

The document discusses algorithms, data structures, and algorithm complexity. It defines an algorithm as a detailed sequence of instructions to solve a problem, and a data structure as a format to organize data. Algorithm complexity is determined by how much time and space an algorithm takes based on input size. Computational complexity is important for choosing effective algorithms as problems increase in size and complexity. Learning algorithms is important because algorithms are used in many daily tasks.

Uploaded by

abel dequina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

FAITH A.

BIAG
BSCS – 3B

1. Discuss the following

a. WHAT IS ALGORITHM

- An algorithm is a process used to carry out a computation or solve a problem. In


either hardware-based or software-based routines, algorithms function as a detailed
sequence of instructions that carry out predetermined operations sequentially.

b. WHAT IS DATA STRUCTURES

- A data structures is a specific type of format used to arrange, process, retrieve, and
store data. There are a number of fundamental and sophisticated forms of data
structures, all of which are made to organize data for particular use. Users may easily
get the data they require and use it in the proper ways.

c. WHAT IS ALGORITHM COMPLEXITY

- An algorithm’s complexity is determined by how much time and/or space it takes to


process an input of a certain size (n).

2. WHY COMPUTATIONAL COMPLEXITY IS IMPORTANT FOR ALGORITHM


DESIGN AND EFFICIENT PROGRAMMING

- When analyzing algorithms, computational complexity is a crucial factor. It’s critical


to be able to choose algorithms for effectiveness and solvability as issues get bigger
and more complicated. It is quite helpful to be able to categorize algorithms according
to their complexity.

3. WHY WE SHOULD LEARN ALGORITHM

- Typically, an algorithm consist of a series of steps that, when combined, verify the
accomplishment of a particular task. In every part of our daily lives, as humans, we
do various acts using algorithms.
ACTIVITY 2 - BSCS 3B
FAITH BIAG

UNDERSTANDING ABOUT ALGORITHM


COMPLEXITY AND DATA STRUCTURES

You might be asking why we pay such close attention to and analyze data structures so
thoroughly. We do this because we want software developers to be independent thinkers. If you
don't have a firm grasp of fundamental computer algorithms and data structures, you cannot be
competent developers and face the risk of becoming an amateur. One has a decent chance of
becoming a professional who performs in-depth analyses of issues and offers workable answers
if one has a solid grasp of data structures and algorithms and starts to think about how they
should be used appropriately. It is impossible to talk about how well algorithms and data
structures work without first defining the term "algorithm complexity," which we have already
covered in a number of ways. The mathematical definitions won't be applied here.
ACTIVITY 3 – BSCS 3B
FAITH BIAG
ACTIVITY – EXERCISES

1. //Online C# Editor for Freejava


// Write, Edit and Run your C# code using C# Online Compiler

Using System
Using System.collection.generic;

Public Class HelloWorld


{
Public static void Main(string[]args)
{
Var student = new
2. SortedDictionary < string>
SortedDictionary < string, string >>();
Var csharpStudents = new
SortedDictionary < string, string>();
VarjavaStudents = new
SortedDictionary < string, string>();
CsharpStudents.Add(“Keril”;
Irarov
CsharpStudent.Add(“Milena”,”patrova”);
CsharpStudent.Add(“Ivan”,”Grigorar”);
sqlStudent.Add(“Stefka”,”Niklova”);
sqlStudent.Add(“Ivan”,”Kolev”);

javaStudent.Add(“stela”,”Minerva”);
student.Add(“C#”,csharpStudents);
student.Add(“sql”,sqlStudents);
student.Add(“java”,JavaStudents);

Foreach (var itemlist in Student)


{
String store Value = string.Empty
Foreach(var valuelist in itemlist.value)
{
String value +=
“{valueList.Key}”+””+;
“{valueList.Value}”+”,”+
}
Console.WriteLine(“{0}:{1}”
ItemList.key, storevalue):
}
}
}
3. # include <studio.h>
# include <stdlib.h>
Stract heap{
Int size;
Int count;
Int*heaparr;
};
Int*heap.siz.count;
Int initial_size=4
Void heap_init(structheap*h)
{
h->count=0;
h->siz=initial_size;
h->heaparr=(int*)mallor(size.(int)*4);
if(!h>heaparr){
print(“Error allocating memory…\n”);

exit(-1);
}
}
4. MultiKeyDictionary<TKey1,TKey2,TValue>Foo;
Foo.Add(Key1,Key2,Value);
Myvalue = Foo[key1];
//value = = MyValue
Foo.Remove(key2);
MyValue = Foo[key1]; //Invalid, Exception or null returned
ACTIVITY 4 BSCS -3B
FAITH BIAG

UNDERSTANDING BIG O NOTATION

The Big O Notation method is a way to quantify how time-consuming an algorithm is. It
estimates how long an algorithm will take to execute as the input increases. It establishes
an algorithm's worst-case temporal complexity, to put it another way. In data structures,
the Big O Notation is used to express an algorithm's maximal runtime.

ACTIVITY 5 BSCS – 3B
FAITH BIAG

UNDERSTANDING IN SORTING

It involves rearranging a lot of elements in a present order, such as alphabetically, from


highest to lowest value, or from shortest to longest distance. Using lists of items as its
input data, sorting algorithms perform specific operations on the lists to create sorted
arrays.

ACTIVITY 6 BSCS – 3B
FAITH BIAG
ACTIVITY 7 BSCS - 3B
FAITH BIAG

UNDERSTANDING IN RECURSIVE

Recursion within the function causes it to be called repeatedly. The recursive condition
causes repeated calls to the function to be made up until the base case is satisfied. The
function's basic case triggers the execution to halt when its condition is satisfied.

ACTIVITY 8 BSCS – 3B
FAITH BIAG

UNDERSTANDING NUMERICAL COMPUTATION

Numerical analysis heavily relies on the study of numerical methods, from their
theoretical development and comprehension to their practical implementation as reliable
and efficient computer programs.

You might also like