3,815 Topics
![]() | |
#include<stdio.h> #include<conio.h> #define n 20 main() { int d,p; int b,i,n,bt[20],at[20],num; int arr[20]; clrscr(); printf("ENTER THE NUMBER OF PROCESSES: "); scanf("%d",&n); for(i=0;i<n;i++) { gotoxy(10,5); printf("PROCESS: %d",i+1); gotoxy(25,5); printf("BURST TIME : "); scanf("%d",&bt[d]); gotoxy(50,5); printf("ARRIVAL TIME :"); scanf("%d",&at[p]); } gotoxy(29,20); printf("SELECT ALGORITHM"); gotoxy(29,25); printf("\n[1] - SJF"); gotoxy(29,30); printf("\n[2] - SRTF"); gotoxy(29,35); … | |
[code] #include<stdio.h> #include<conio.h> #define n 20 main() { int d,p; int b,i,n,bt[20],at[20],num; int arr[20]; clrscr(); printf("ENTER THE NUMBER OF PROCESSES: "); scanf("%d",&n); for(i=0;i<n;i++) { gotoxy(10,5); printf("PROCESS: %d",i+1); gotoxy(25,5); printf("BURST TIME : "); scanf("%d",&bt[d]); gotoxy(50,5); printf("ARRIVAL TIME :"); scanf("%d",&at[p]); } gotoxy(29,20); printf("SELECT ALGORITHM"); gotoxy(29,25); printf("\n[1] - SJF"); gotoxy(29,30); printf("\n[2] - SRTF"); … | |
I have been working on this assignment for couple weks (aling with my other classwork) and I couldn't get it anywhere, can any one help me doing it. Or can you at least tell me hints and tips toward resolving the program: the question is: The element selection problem is … | |
Would anyone be able to help me get started on writing a program to implement a page-replacement algorithm suchs as FIFO? | |
I'm looking for an open source webcrawler which can be easily modified. Is anyone aware of a good open source crawler? I'm just enrolled in a dataminning course and would like to develop an algorithm which categorizes web pages. I need to be able to control which pages are indexed … | |
Hi, I need help with Round Robin algorithm. I don't understand how to implement the process. | |
I am a beginner in C++ and I need some help because my decoding is coming out as a series of numbers. Here are the detail as to what I am trying to do. I wrote 2 programs that compress and decompress a text file, each taking input and out … | |
Guys, I have a question regarding the use of STL next permutation algorithm say I have a vector a[] = [ 52 3 4 2 49] How do I use the next_permutation algorithm for only the last 3 elements (in this case 4 2 and 49) and store those in … | |
I want to implement Dijkstra algorithm for shortest paths in Java, can anyone please help me with the code. | |
Hi I am completely new to the programming and I got 0/10 on my last algorithm in pseudo code. I need to write an algorithm using pseudo code to score a tennis match. The algorithm takes two scores and the player who won the point as input and retuen the … | |
:icon_question: [COLOR="Green"][B][I][/I][/B][/COLOR]how can we display the elements of a linked list? | |
I was wondering is there any algorithm, method, concept, idea for "Reverse Calculation"? Basically I provide an output/Answer , and 1 or more inputs, then it will result the math formula/pattern. For example 1: I provide, Dynamic Output: 30; I provide, Dynamic Input Value A: 2 I provide, Dynamic Input … ![]() | |
Can anyone suggest an algorithm or function to generate combinations/ permutations of a group of substrings stored in a vector. The substrings consists of 3 letters and the resulting string combinations should be of a size that is a multiple of 3. | |
the new algorithm will consist of combining Huffman and Shannon-Fano coding system, which will be later translated in C language. Any proposals??? | |
hi guys! I'm having my thesis right now.. And Im working on my study which is called "SMS-based spam filter".... I dont know if this is really feasible, but im still researching.. But I'm having problems if what algorithm should i use.. I read about Markovian, Willow, and Correlator algorithms... … | |
you have a coin bias so that each toss produces heads with probability P and tail with complementry probability Q=1-P. Assume that each toss of a coin is independent from previous tosses: the probability of getting head at any given tosses is exactly P, regardless of previous outcomes. unfortunately we … | |
I got this requirement wherein i have to program the different cpu algorithm namely FCFS, SJF and Round Robin..but i dont know how to make a round robin.. please help me with it..i need it tommorow:( here's my requirement..Link: [url]http://www.4shared.com/file/24492109/a3069b64/ALGO.html[/url] if there is a problem with the link please contact … | |
Is it possible to prove that an efficient parallel algorithm can find an efficient sequential algo for same problem... (using a polynomial number of processors and taking polylogarithmic amount of time) ?? | |
I have a program that will find the certain ammount of fibonacci numbers. And now i have the question which is the best code for counting time in fibonacci algorithm? I have to find out how many numbers can my algorithm count in 1 minute? the code: [code]//rekursiivne algoritm public … | |
function C(fl, k) if k 0 or 1< = n then return 1 elsereturn C(fl—1,k—1)+C(fl—1,k) Analyse the time taken by this algorithm under the (unreasonable) assumption that the addition C(fl — 1, k — 1)+C(fl —1, k) can be carried out in constant time once both C(fl —1, k —1) … | |
Hey everyone. This is pretty lame of me having to do this, but I haven't done Java for about a year and this algorithms class I'm taking assumes we remember all the details. Anyway, I'm trying to implement a method from an interface in another class's main method. Here's the … ![]() | |
If I were to implement a heap constructed of integer values, does it matter that the root is not the smallest value? In my algorithm book it always shows the root being the smallest value given. But the [URL="http://en.wikipedia.org/wiki/Heap_%28data_structure%29"]Wiki entry[/URL] shows the root as being the largest value. | |
Hey peeps, i am just another lost programmer here looking for some good old fashion help, pertaining to a histogram program. If there is anyone out there that can follow me as to what i will me explaining i would like it if u'd step in make a suggestion or … | |
hi, can any one please explain to me that what are the differences and the relationship among algorithm, program and pseudocode. thanks | |
I can only get 2 of the buttons to work - what am I doing wrong? I have been working on this for 5 days. I also cannot get my icon to work - do I need more of an address? [CODE] import java.util.ArrayList; //For ArrayList public class Product implements … | |
Hi im new to this site, im sory if i post a message on a wrong section.. i juzt wana get some help on my assignment,, that is, doing a round robin or short job first cpu scheduling algorithm on c or c++.. please help me. thankz a lot!.. | |
I have been searching for a solution to this problem: I'm given an expression in infix which can contain *,/,-,+ and I have to find the reduced form of this expression. Ex: Input: ((A+45)*16+(B-C)*D/4 )/8+ 55 Output: A*2+B*D/32-C*D/32 +145 All that can be calculated must be calculated and the simplest … | |
Hi, I have a txt file with some details as given in the below format: filename index file position file length ex: 0001.ogg 123 000001 2345 0002.ogg 124 000099 3457 ...... ..... I need to read the third parameter (i.e file position) with corresponds to its file name (first parameter). … | |
Am new here, i just discovered this site. I don't know that such interactive site for people interested in IT exists. Please help me out, i stated a computer programe yesterday and i have a problem solving it, below is the qestion. A quadratic equation can be written in the … | |
Hello! I want to implement a avltree using C++,and I have do most of it,except the remove() algorithm. My question is when should I rotate the tree in remove(). I hope that any body can represent the situation for me using the Pelple's language,because the implemented code depend on the … | |
hi, i recently heard about splay trees and i am searching for a splaying algorithm...,i ve found one but it isn't very easy to understand....so if anyone has to share an implementation followed by a short explanation it would be great! PS: i 've undestand the basic concepts like zig, … | |
I want to compute closed surfaces with using the dxf file. I don't have much information about this file format. User will draw lines or arcs, than, first I will tell them that they draw a closed surface, second I try to compute area of closed surface. any idea or … | |
hey all, I'm new to this forum, and really start to like it :). Here we go. I have some trouble helping a "tute" of mine (I normally give physics tuitions) with one of his assginments on C++. As I did C++ years ago, I was feeling confident with it. … ![]() | |
I am taking a computer science course and it is very basic. My question: If an algorithm takes 5n log2 n + 3n^2 + 4n+ 500 steps in the worse case state its complexity using Big- Oh Notation. I don't have any clue on how to solve this problem. Any … | |
HELLO GREAT MINDS OF THE WORLD.....AM studying computer science and algorithms is a new concept to me....I have written an algorithm which returns a smallest value in an array and am not that sure if its correct.... 1 s = A[1] 2 for i = 2 to lengthA[] do 3 … | |
Hi, Wishes. I would like to invite peers here to give me some pointers , tips and hints on "how to" on the following doubt of mine:: Scene 1. I got 4 records listed. I check ALL and click for action. first 3 records got acted upon by a algorithm … | |
Hi.. im currently writing a program in python to parse a log file.. this log file is expected to be very big - (70MB - 250MB ) in size.. in the file there's this whole bunch lines of internet activity.. i supposed to parse each line and extract some information.. … | |
construct a hierarchy chart (divide the tasks into modules) then an algorithm,flowchart, or pseudo code that will allows a person to track a list of personal contacts. for each contact there are five fields - First name - Last name - Occupation - Phone Number - Relationship (of the contact … | |
Hi, my name is Andrew. I believe this will be my first post on daniweb so please bear with me. I'm working on a compression algorithm (miniSEED steim 2 compression if anyone is interested, its for seismic lossless compression) in C so I do a lot of bit manipulation of … | |
Hi I made a function which is suppose to send email, only problem is that I can send the email but its blank so can anyone tell me what I am going wrong. [code] //Function that send multipart emails function email2($TO, $PREMADE, $FROM = false) { //headers for emails //create … | |
Hi, I am having a strange problem with a simple process. Heres the code. [CODE] bool areNumbers = true; bool Anything = true; int numBytes = 1; long inCrem = 0; while(gPlacerID != tgPlacers[inCrem]->GetPlacerTypeID()) { inCrem++; if(inCrem == tgPlacers.size()); { Anything = false; break; } }[/CODE] This code is part … | |
Hey there! So basically, as you could probably have figured out from my title, I am looking for some information in regard to the PHP function, Rand(). I'm looking for as much information into exactly how it works, and the accuracy and predictability of the pseudo-randomness. I am working with … | |
Hi guys! I am on my last year in computer science and we are going to enhance an existing algorithm. I would like to ask if you know some algorithm that i can enhance. For instance, the algorithm used in searching or browsing the net. Thanks! | |
I wrote this trying to understand templates, functors and inheritance. it works but I want to know if there's a better way. Is a base and derived class overkill for a sorting function? How cand I make it better? [code=cplusplus] /* sorting test Class based sorting by Kimberly Hamrick */ … | |
Hi , I have little bit of knowledge in C++. When I run the following program its gives me segmentation error. I tried to do all the possible things by reading online but not able to figure out the error. I ran it suing gdb debugger but still it stays … | |
Hi, I am writing a program for a bioinformatics class. I have to implement a certain algorithm. I am a biologist and my background in programming is not that great. I have found the algorithm online that I want to implement but I need it explained in regular terms. The … | |
- finiteness - absence of ambiguity - sequence definition - input, output - effectiveness - scope definition thanks! | |
Hi, everybody. The question is : if the user input a set of numbers, you don't know how long the set is, like 1, 2, 3, 4, 5, 5, 5, 6, 1, 3, -1, -12141, 123, -1...., you are asked to find the dumplicate numbers in this set. I mean … | |
Any one knows different types of Prim's Algorithm Implementation. | |
ok i have a problem, like you can see in the code i already create a bidimesional array step by step..... ok i want to eliminate that, and instead of that i want to load the array from a .txt like this> 0-0-6-0-0-0-6-0-0-0 0-0-8-4-0-0-0-0-0-0 6-8-0-0-0-0-0-0-0-0 0-4-0-0-2-0-0-0-0-0 0-0-0-2-0-4-0-0-0-0 0-0-0-0-4-0-0-1-0-0 6-0-0-0-0-0-0-0-0-5 0-0-0-0-0-1-0-0-7-0 … |
The End.