3,815 Topics

Member Avatar for
Member Avatar for baberca

#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); …

Member Avatar for stymiee
1
599
Member Avatar for baberca

[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"); …

Member Avatar for Salem
0
306
Member Avatar for gomickle

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 …

Member Avatar for MacGyver Orca
0
1K
Member Avatar for Sanchez10

Would anyone be able to help me get started on writing a program to implement a page-replacement algorithm suchs as FIFO?

Member Avatar for vas555552006
0
73
Member Avatar for SkyRenderX

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 …

0
65
Member Avatar for niki01

Hi, I need help with Round Robin algorithm. I don't understand how to implement the process.

Member Avatar for Killer_Typo
0
156
Member Avatar for j2swift

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 …

0
82
Member Avatar for Crouchinho

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 …

Member Avatar for vijayan121
0
175
Member Avatar for nwad

I want to implement Dijkstra algorithm for shortest paths in Java, can anyone please help me with the code.

Member Avatar for jwenting
0
83
Member Avatar for icecube

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 …

Member Avatar for icecube
0
95
Member Avatar for gaggu82

:icon_question: [COLOR="Green"][B][I][/I][/B][/COLOR]how can we display the elements of a linked list?

Member Avatar for Narue
0
64
Member Avatar for jjt

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 …

Member Avatar for iamthwee
0
175
Member Avatar for maverick786

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.

Member Avatar for Salem
0
67
Member Avatar for khalid0404

the new algorithm will consist of combining Huffman and Shannon-Fano coding system, which will be later translated in C language. Any proposals???

Member Avatar for khalid0404
0
114
Member Avatar for hertzzz

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... …

0
61
Member Avatar for xraaz

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 …

Member Avatar for darkagn
0
89
Member Avatar for therohanz

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 …

Member Avatar for therohanz
0
107
Member Avatar for asifrahman

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) ??

Member Avatar for Rashakil Fol
0
46
Member Avatar for kohuke

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 …

Member Avatar for kohuke
0
154
Member Avatar for xraaz

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) …

Member Avatar for xraaz
0
80
Member Avatar for Icetigris

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 …

Member Avatar for jtonic
0
135
Member Avatar for jaden403

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.

Member Avatar for Narue
0
60
Member Avatar for Robin_Dragon

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 …

Member Avatar for Robin_Dragon
0
160
Member Avatar for chikyong

hi, can any one please explain to me that what are the differences and the relationship among algorithm, program and pseudocode. thanks

Member Avatar for kxh29
0
57
Member Avatar for bigbluesky

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 …

Member Avatar for plasmafire
0
134
Member Avatar for cathy01

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!..

Member Avatar for vijayan121
0
107
Member Avatar for ciuchi

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 …

Member Avatar for ciuchi
0
1K
Member Avatar for ishwarbg

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). …

Member Avatar for vijayan121
0
98
Member Avatar for tressureme

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 …

Member Avatar for christina>you
0
88
Member Avatar for meiyantao

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 …

Member Avatar for meiyantao
0
152
Member Avatar for n.aggel

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, …

0
77
Member Avatar for a.baki

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 …

0
70
Member Avatar for dannyadp

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. …

Member Avatar for iamthwee
0
74
Member Avatar for rockyman

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 …

Member Avatar for rohit saroha
0
60
Member Avatar for shaqnolysis

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 …

Member Avatar for shaqnolysis
0
103
Member Avatar for hbmarar

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 …

Member Avatar for pritaeas
0
73
Member Avatar for bergy_nj

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.. …

Member Avatar for jrcagle
0
348
Member Avatar for jaz

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 …

Member Avatar for jaz
0
125
Member Avatar for acchao

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 …

Member Avatar for Salem
0
634
Member Avatar for ashneet

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 …

Member Avatar for cereal
0
183
Member Avatar for seanw

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 …

Member Avatar for seanw
0
110
Member Avatar for Staplerkid

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 …

Member Avatar for cereal
0
125
Member Avatar for lheslhai

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!

0
47
Member Avatar for Hamrick

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 */ …

Member Avatar for thekashyap
0
150
Member Avatar for psrujan

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 …

Member Avatar for Techpedia
0
110
Member Avatar for Akilah712

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 …

Member Avatar for Akilah712
0
103
Member Avatar for comCY

- finiteness - absence of ambiguity - sequence definition - input, output - effectiveness - scope definition thanks!

Member Avatar for sj87
0
79
Member Avatar for kinggarden

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 …

Member Avatar for vijayan121
0
735
Member Avatar for Kashif
Member Avatar for Kashif
0
84
Member Avatar for fernando22

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 …

Member Avatar for fernando22
0
189

The End.