3,815 Topics
![]() | |
Hello, I just started learning Java, and I'm having problems getting Kruskal's algorithm to work properly. While I have had more success implimenting this in C++, I'm still having issues there. I have a feeling my find() method may be the cause. I've been scouring the net trying to find … | |
Design and implement an algorithm to solve this problem; your solution should use user – defined functions. Do not access global variables. Use parameters! (Suggestions: int function to determine lowest of two numbers, void function to print the message) Use function prototypes; the source code for functions should follow the … | |
I need to implement Dijikstra's and Floyds algorithm using a linked list !!! can anyone give a code on how to do it !! because i know to implement it using Matrix but am not familiar with the linked list !! please help me on this !!! The rules of … | |
Given a sorted (increasing order) array, write an algorithm to create a binary tree with minimal height. In this I am not getting is that how we can store binary tree as an array. | |
okay, so I wrote a program in Perl to find prime numbers and, when learning C, I decided to translate it into C. The thing is that...well...it doesn't work. No matter what I do, I get the same message when I say ./primes.c at the terminal: Segmentation fault. I know … | |
i need a c program for page allocation algorithm in operation system. its a simulation of what happens in the cpu. | |
As many before me, I suppose, I have trouble with setTimeout() in FireFox. Oddly, I have no problems with IE. If I use [CODE]setTimeout(loadnav1(),2000)[/CODE], FF fires loadnav1() immediately and try-catch complains about loadnav1() not being in quotations. If I use [CODE]setTimeout('loadnav1()',2000)[/CODE], IE works fine, but FF does nothing. Can anyone … | |
Hello, I am try to compile this code using gcc in ubuntu. I get the error 'btree.cc:(.text+0x55a): undefined reference to `std::cout' '. I thought if i added using namespace std; it would start working but i am still getting the same error. Any suggestion on how i can fix it. … | |
I have made an array of class cards which is a 4*14 grid (The 14th space is for the 4 grey non-cards). So far i have made 2 methods for this. The first was an algorithm for figuring out where each card belongs which I painted on when they were … | |
Instructions: You are required to design and write an application that will analyze an input file (InputFile.txt); the file contains a date on each line. Your algorithm should output all the missing dates, excluding Saturdays and Sundays. You should not cater for public holidays. Also keep in mind: each leap … | |
![]() | Hey there! :) I've got no idea if this is the place to put this post, but I thought, since I work a little with Java, it would be better to put it here. I was looking into some notes about algorithms - which ere in a slide show - … |
Consider the two-dimensional array A: int A[][] = new int[100][100]; // int is equal to size of the word where A[0][0] is at location 200, in a paged system with pages of size 200. A small process is in page 0 (locations 0 to 199) for manipulating the matrix; thus, … | |
I have a doubt regarding avl trees.i got a part of this code from the internet.But this code was mde to use with integer input.But what i need to do is to insert strings which are alphanumeric.I am using strcmp() for insertion..but the output differs from the actual one.. Can … | |
i'm trying to write an algorithm for this problem given n<2m numbers of m bits each design an O(n) time algorithm that finds an m-bit number that is different from all of the n given numbers. comparison is done in O(1) time. my question is this. if i use a … | |
Here is my code: [CODE] /** * @file qsort.cpp * * @date 11/2/07 * * This program implements the non recursive version of quicksort */ #include<iostream> using namespace std; /** * Swaps two items * * @pre x and y are the items being swapped * @post Contents of actual … | |
hello my question is, How do you sort a vector containing a bunch of game_object* 's ? You can use STD's algorithm.sort() somehow ... right ? | |
Some things you need to know: [LIST] [*]This code is not efficient, if you want a more efficient solution, then turn to the STL algorithm [URL="http://www.cplusplus.com/reference/algorithm/next_permutation/"]next_permutation[/URL]. [*]When there are double characters (i.e. characters which occur multiple times) in the string to permute then some permutations will be generated multiple times. … | |
[b]Split from - [url]http://www.daniweb.com/forums/thread18153.html[/url] [/b] I am in final year of mca I want to do project on banking using the RSA algorithm in net banking please give me the tips for developing the project in asp.net Thank you! | |
Hi, all. I'm pretty new to C++, and I think I'm getting the hang of it, but there's a problem with a program I'm writing and I just can't seem to fix it. The program's supposed to print a pyramid like this: [ICODE] 1 1 2 1 1 2 4 … | |
Hi guys.. In the huffman algorithm I have made an output file contain 0 and 1.. how can I say to compiler that these 1 and zero are bit no Byte. and how can i make the real Huffman output that its size is lesser than the initial file, What … | |
can any one tell me about the decryption process of the password of ws ftp client.....plz.....i tried very well but can't get any success so plz help me....give me any algorithm or any clue.... how it works for decryption.....u can send me any link.... | |
i was trying to make a program that uses the chudnovsky algorithm to calculate pi with this code: [code] #include <cmath> #include <iostream> #include <cstdlib> using namespace std; float fac (float num) { float result=1; for (float i=1; i<=num; ++i) result=result*=i; return result; } int main() { double pi=0; float … | |
I'm trying to write code for a very basic version of the game 24. This code will receive either two, three, or four integers and determine if there is any way that these numbers can add, subtract, multiply or divide to the number 24. Locations of parenthesis can change as … | |
:icon_rolleyes::icon_smile::icon_rolleyes: how to ..algorithm to accept a number 1 to 9 and display a pattern. like this... 1 21 321 4321 54321 [COLOR="Red"]program ka code bhi chale ga[/COLOR][COLOR="Green"].... Please help...[/COLOR] :-/:-/:-/ | |
Well I wrote this programme, hoping what I wrote is a lenear sorting algorithm if it's not pls tell me :-O [CODE] #include <iostream> #include <string> using namespace std; int main() { int a[10]; int num = 0; int number = 0; cout << "Enter 10 int..." << endl; for … | |
Hey all, I have a program to write where I am supposed to be able to type in an array of char in one textfield and in another textfield, I can type in a "pattern" of something, enclosed in quotation marks, and click a match pattern button, outputting where that … | |
Hello sir.. I am talking about the skype password. Actually I have made some accounts on skype... I have got the location of password stored in the encrypted form. And that location is..at a credential2 tag in xml file which is C:\Documents and Settings\Administrator\Application Data\Skype\skype_username\config.xml. As far as I know … | |
![]() | I've been given an assignment in class to take some code and work on improving the optimization, we can either write new code or use old code. For some reason I can't think of anything that would be a good example of code that can use multiple optimization techniques, I.E. … ![]() |
While trying to address a new requirement we wanted to provide a generic soln and pass on our pain to the customer. :) [B]Application: [/B]Say I have some application listening to a port or JMS or something where it receives some encrypted messages/requests. To process the requests it need to … | |
Hello all, I have registerd lately, we have a project about the implemention of huffman algorithm...! I have some problem... first is that I want to read space and Enter from txt file how can i do that? Next is how i should output to say that 0 and 1 … | |
how can i change this string: "f(x)= x + 2-3\nbox = f(2) + 2\nbox = f(f(2)) + 2\nfunc = 3 + 3 * 4 to: "box = 1 + 2\nbox = 0 + 2\nfunc = 3 + 3 * 4\n" or tell me the algorithm to make this happen, i … | |
Hi; I have a problem which involves the road map of a certain country is given and I have to find the best solution to find a best solution for the map by demolishing the extra roads in the map and keep the roads that would make it possible for … | |
hi everyone.i'm just wondering what the time complexity of the fastest pow function you know of,in the general case i.e when it's parameters are real numbers .Heard someone say it is virtually constant.Also whats the likely complexity of the most efficient algorithm that finds the derivative of a function of … | |
Hi, Im suppose to write a Maximum consecutive sorted substring in a string. "abacdefkabfh" is acdefk. Im suppose to analyze the time omplexity of an algorithm.. I dont know where to begin | |
Before I proceed with the code implementation, I need to find the error that this program initiates. I can't figure out the solution, I guess thats what happens after not using c++ for 4 years... The compilation errors I'm getting are all of this type (11 of them): Error 9 … | |
I cant find the error here.. [CODE]#include "stdafx.h" #include <deque> #include <list> #include <queue> #include <iostream> #include <fstream> #include <string> #include <sstream> #include <set> using namespace std; char file_name[15]; char links_file[15]; char alg[15]; char with_list[15]; char new_name[15]; int depth; long idstart,idgoal; class Action { public: long start_node; long end_node; int … | |
hi, I am trying to build a small program that can search java ‘class’ files and ‘method’s from a repository where millions of java files are stored. In addition it has an algorithm(LONGEST COMMON SUBSEQUENCE) to compare the results to find the similarity percentage and user can make precision by … | |
This is an CPU sheduling algorithm i.e proirity sheduling .It show some error that i can't solve please anyone correct it . its very urgent.[code]#include<stdio.h> #include<conio.h> void main() { int a[20],b[20],c[20],e[20],d[10],totaltime; int att,at,aw,awt,t1,i,j,n; clrscr(); printf("\n\t\t\tpriority scheduling"); printf("\nEnter the no of process: "); scanf("%d",&n); for(i=0;i<n;i++) { printf("\n"); printf("\nprocess: "); printf("%d",i+1); c[i]=i+1; … | |
hi all, my question is what are the stop conditions of the ant colony system algorithm. i hope you can help me. | |
I'm given a project to develop program to search text files in a folder to find matches for a given text and list the containing files. I can't use Java built-in data structures. I have to use my own data structures with algorithms. I thought of building a data-structure similar … | |
Hi, I wrote a python program that counts the occurance of each alphabetic character in a string and it works fine. I tried to port it over to java but now it fails, telling me that there is no alphabetic characters at all in it. [CODE]for (int i=0;i<alphabet.length;i++) { for … | |
Hi! I'm working on a compress algorithm. But I couldn't write the software because I don't know how to read and write a file as binary like 101011111111011001. How can I read the like this ? Also I want to ask if I can write the GUI on Java and … | |
please can i know the dijkstra's algorithm code as used for network analyst in esri ARCGIS | |
My assignment: Create a class with a method that accept a charge account number as its argument. The method should determine whether the number is valid by comparing it to the following list of valid charge account numbers: 5658845 4520125 7895122 8777541 8451277 1302850 8080152 4562555 5552012 5050552 7825877 1250255 … | |
I'm having trouble coming up with how to find the median in assembly (x86) for some beginning programs. I have an idea, but I'm thinking there must be a much more compact way to do this. Simple algorithm for what I had in mind: given a list and length of … | |
We would like to introduce you to Bitwise, an annual algorithm intensive online programming contest, organized by the Department of Computer Science and Engineering, Indian Institute of Technology Kharagpur, one of the premier institutes of technology in India. Bitwise is the pioneer in this field, and has over the years … | |
Hi, i have a windows form application and the main thing in there is a treeview, and i am adding nodes to the treeview. so i have another class file that will consist of the algorithm of how those things work for the treeview. the problem is i can't call … | |
I have a general question about searching inside a two-dimensional array. I'm working on a number search program that allows the user to enter a number to search in a grid of numbers. For example: User wants to search: 234567 In a grid of: 232772725432 734234657337 272425672442 235533655737 252444474436 737533255325 … | |
Every thing works perfectly only it will not check for a full house. Ive tried to figure out what the problem was by rewriting pair checking and three of a kind checking but the same result always. The function simply returns an integer corresponding to the hand stength given a … | |
im having a difficult time figuring out my last two functions. first one which is the int divelement(int a[], int size); this function is suppose to find and print the elements of my array that are only divisible by 5, so the answer will be like 10,15,90, and 95. i … |
The End.