Showing posts with label My Works | Programs. Show all posts
Showing posts with label My Works | Programs. Show all posts

Depth First Search - Simulation Viewer Software


We the students of CSE department and others who are related to this field know about Depth First Search technique. In this current semester, my teacher asked to write a software which will be able to show simulation of this search technique on a tree inserted by user. Thus I wrote this software which is able take a tree as input and then show simulation of DFS on it.

Breadth First Search - Simulation Viewer Software

We the students of CSE department and others who are related to this field know about Breadth First Search technique. In this current semester, my teacher asked to write a software which will be able to show simulation of this search technique on a tree inserted by user. Thus I wrote this software which is able take a tree as input and then show simulation of BFS on it.

However, this is the first time I am working with Drawing Objects in VB.NET and this made the software a little complex in back end. 

Explain and Solve : Round Robin (RR) CPU Scheduling Algorithm in C++ with Explanation


If you haven't read/tried the earlier/other problems then click the links follow:

Round Robin CPU Scheduling Algorithm in C++ with Explanation: 

This method is quite same as the FCFS but the difference is the in this case the processor will not process the whole job (process) at a time. Instead, it will complete an amount of job (quantum) at a turn and then will go to the next process and so on. When all job has got a turn, it will again start from the first job and work for a quantum of time/cycle on each job and proceed. Now consider a CPU and also consider a list in which the processes are listed as follows,

Arrival
Process
Burst Time
0
1
3
1
2
2
2
3
1

Quantum = 2 Second

Explain and Solve : Priority Scheduling CPU Scheduling Algorithm in C++ with Explanation

If you haven't read/tried the earlier problems then click the links follow:


Priority Scheduling CPU Scheduling Algorithm in C++ with Explanation: 

This method is quite same as the SJF but the difference is that instead of choosing the next process to work on by the shortest burst time, CPU chooses the next process by the shortest priority value. Here, all the processes are given a priority value. The process with the shortest (The most shortest is 1) priority will be worked on first and so on. Now consider a CPU and also consider a list in which the processes are listed as follows,

Arrival
Process
Burst Time
Priority
0
1
3
2
1
2
2
1
2
3
1
3

Preemptive Shortest Job First (SJF) CPU Scheduling Algorithm in C++ with Explanation


If you haven't read/tried the earlier problems then click the links follow:



Preemptive Shortest Job First (SJF) CPU Scheduling Algorithm in C++ with Explanation

Preemptive Shortest Job First (SJF) CPU Scheduling Algorithm in C++ with Explanation:

Preemptive Shortest Job First (SJF) is a CPU scheduling algorithm in which the CPU, at any given time, looks for the job with the shortest burst time among the jobs in hand and starts processing it. In SJF the processor will not just pick the job that arrived first, rather will compare them based on their required CPU time and will pick the one which requires lowest amount of time.

Explain and Solve : First Come First Served (FCFS) CPU Scheduling Algorithm in C++ with Explanation

If you haven't read/tried the earlier problems then click the links follow:


First Come First Served (FCFS) CPU Scheduling Algorithm in C++ with Explanation: 

CPU gets a lot of processes to handle. The problem is shortening the waiting time for a process to reach CPU and get processed. Now consider a CPU and also consider a list in which the processes are listed as follows,
Arrival
Process
Burst Time
0
1
3
1
2
2
2
3
1

Here, Arrival is the time when the process has arrived the list, Process Number is used instead of the process name, and Burst Time is the amount of time required by the process from CPU. Well, as the unit of time you can take anything like nano-second, second, minute etc whatever. We consider it as second.


How to merge two sorted arrays? Merging Sort Algorithm, Explanations with Animated Presentation, The Program

Merging Sort: 

Merging sort requires two previously sorted array which will be merged into one single array which will be a sorted array. If the source arrays are not sorted then the algorithm won't work. If you need to sort two unsorted arrays then you can place one array after another then operate the new array with any sorting algorithm to sort it. Another important thing is that, the source arrays will have to be there in sorted in the same order, either ascending or descending.

My Works | Final working on my Expression Based Scientific Calculator, hoping to finish tonight

My expression based scientific calculator V 0.03 is 80 percent complete. I was thinking that I will add more options to it, but sorry to say that its much boring to me now. However, here are some screenshots of the software, leave your comment about these.

The Calculator Front



Find out if Binary Tree is Sum tree or Not

Problem:

Binary Tree is Sum tree or Not. [Problem Link]

Explanation:

Write a function which returns True if the given binary tree is a Sum Tree, else False. A sum tree a is a binary tree where the value of a node is the summation of the subtree at both its left and right. An empty tree is also a sum tree and value of its sum can be considered as 0. A leaf node is also considered as sum tree. For example, following is a sum tree,