405 Topics
|
|
Hello, for a school assignment I was supposed to write an insertion sort algorithm for a doubly linked list. As the feedback system of this particular course is rather weak (actually non-existent) I would like to ask you for your honest opinion about how well this is implemented, what could … |
|
I'm studying for a test and appreciate your help. How to calculate the running time (T(n)) of the following segment (written in Pascal): k := 0; m := n; while m <= n do begin k := k + 1; m := k * k; end; for i := 1 … |
|
I've have a String String s = " ~ ( A || B ) && C "; A B C can take 0,1,x they follow Boolean Arithmetic w.r.t 'x' Boolean Arith is as follows 0 || x = x 1 || x = 1 x || x =1 x && … |
|
The Interviewer Candidate Problem It is a walk-in-interview setup having an interview room with one chair and a waiting room with a number of chairs. The interviewer interviews candidates in the interview room. When the interviewer finishes interviewing a candidate, he dismisses the candidate and goes to the waiting room … |
|
I need a maze solver that uses queue type breadth first search to find a way out of the maze and print it out. I already made a dfs one but i cant seem to figure out how to make a bfs one. Here it is: #include <stdio.h> #define red … |
|
Dear all, I need the code for counting sort algorithm but I try this code but is not working #include <iostream> #include <conio.h> #include <time.h> #include <stdlib.h> //srand and rand functions using namespace std; void add_random_numbers(long arr[], long b); void countingSort( long left, long right, long vector[], int k, long … |
|
I want to write a code for Radix Sort based in this way how I made the Quick Sort, how can I do with Radix Sort, can anybady have any idea I have search a lot but I can not find any exactly what I need #include <iostream> #include <conio.h> … |
|
I want to make this code with random numebr array and time executation? Does anybady nows how can I do? #include <iostream> using namespace std; void print(int a[], int sz) { for (int i = 0; i < sz; i++ ) cout << a[i] << " "; cout << endl; … |
|
I want to do one example of Radix sort generating random numbers and timing. Can anybady help me? Here is the radix pseudocode function radixSort(String s) for i in (s.length - 1) -> 0 do stableSort(s[i]) |
|
I'd like to find an algorithm book that's either meant to be or good to use as a reference. By "reference" I mean that it contains all the basic algorithms (machine-learning algorithms especially) like QuickSort, Logistical Regression, Clustering. Preferably, including both the mathimicatical definition as well as psuedo code, or … |
|
So I have writen a program that takes a linkedlist and shuffles it randomly using mergesort algorithm. The problam I'm having now is that the original list loses elements after the shuffle, and after som checking with some outputs it seems that it always one of the extra lists who … |
|
Hello programmers! I have been working on STL algorithms for some time now as a beginner, and I started doing an exercise, among which is the task of `use the fill algorithm to fill the entire array of strings named items with "hello"`. My code for this is below: // … |
|
First there was Panda, and then there was Penguin, but is there now Ghost as well? Webmasters will immediately know what I'm talking about as far as Penguin and Panda are concerned: updates to the Google search results ranking algorithm designed to make the search experience more relevant for end … |
|
I guess most of you would have seen the algorithm for the following problem: **Input:** Set of intervals(time) **Output:** Partion of intervals into minimum subsets such that no interval in a subset overlaps. **The Algorithm:** Sort intervals by start times and look them in this order, put each interval in … |
|
I am trying to create a File Searching Utility that finds all Files with a given Name which searches all Folders (Sub Directories, and Sub Directories of Sub Directories) in a given Directory. I was thinking of a way to use For Loops, or For Each, but that would mean … |
|
i have to find a round trip for an Edinburgh bike club (data below) using two approaches: a) a conventional search algorithm; b) a genetic algorithm What i must do : 1. Produce a program using a search algorithm of your choice that will find a ‘good’ circuit from Edinburgh … |
|
Hi! I want to know how artificial intelligence system(s) work(s)? I want to know whether artificial intelligence depends upon software i.e special type of software having special algorithms or it depends upon special type of hardware having characteristics like human brain cortex and neuron system or both of them(software and … |
|
When I try to compile my code in visual basic 2010 it gives me the error 1903 and when I compile the code in Code::Blocks it opens the standard template library's algorithm.h file and takes me to line 2163 if (*__i < *__first) I don't want to modify anything here, … |
|
Hello, I recently took a course on assembler/compiler construction. In it we covered parsing algorithms such as LL(n), LR(n), LALR(n), and SLR(n). I understand how these parsing algorithms can be used to determine **if** an input string follows a context free grammar (CFG). At some point I also understood how … |
|
There was a user named Mitja Bonca wich spent a lot of his time on the C# section. Before a year ago i ve seen a algorithm that he did for a guy providing him help in that way. This algorithm was tremendous (was then) and i can t locate … |
|
hello. I need some help on our implementation on lines of code program. here's the algorithm we have: 1. The LOC program will start by asking for the filename of the program to be counted. 2. Browse for the filename of the program to be used. 3. The contents of … |
|
hello Please help me. I need pseudo code or Algorithm or flowchart of Weighted page rank algorithm that search engine can use for ranking the websites in its search results. Please help. thanks in advance. |
|
I have a problem in c, i want to achieve this kind of thing using the code i written below. The input and output should be like this: Input Freq Output Freq 1 0,1,4,2,5,3 add two first (0+1) 0,1,4,2,5,3,1 2 4,2,5,3,1 add min and last (2+1) 0,1,4,2,5,3,1,3 3 4,5,3,3 add … |
|
please i want to implement another algorithm for clustering based on the problems the existing are facing such combining 2 algorithm that will have no lapses at all. |
|
not sure where to post this but anyways I wrote this code to calculate the max profit from a 5 kg max weight. heres the code. there is an error with the price. when I use small values below 20 its all normal but when I input large values there … |
|
I'm trying to implement an algoirthm descirbed here: http://pub.uni-bielefeld.de/luur/download?func=downloadFile&recordOId=2497720&fileOId=2525546 The purpose of that algorithm is to create a concept hierarchy based on a document corpus. For instants, a "Dog" concept would be a child of the "Animal" concept in such a hierarchy. To the point, I've come accross a peice … |
|
isShorter(const string &s1, const string &s2) { return s1.size() < s2.size(); } stable_sort(ret.begin(), ret.end(), isShorter); either using stable_sort or sort the result is shown in the attachment. meanwhile: "By calling stable_sort, we can maintain alphabetical order among those elements that have the same length:" - C++ Primer 5th edi. which … |
|
I have written this code to variably test Prim's algorithm and I am timing it using clock(). For some reason it always returns 0 as its running time. I have other code that I have used this exact implementation in and they are returning the currect running times. The code … |
|
**hello peeps and geeks, i am missing the MinSpanningTree function here.. any help please? need to fill up the function to get a) Minimum spanning tree cost for the graph b)Spanning tree path for the graph. E.g in matrix or adjancency list. ** #include <iostream> #include <ctime> // For time() … |
|
Hi, In below code snippet , can anyone let me know how to print the functor value output (3,4,5,6,7) without embedding add function in class. #include<iostream> #include<vector> #include<algorithm> using namespace std; void add ( int i) { i=i+2; } int main() { vector <int> vec ={1,2,3,4,5}; for_each(vec.begin(), vec.end(),add); for (auto … |
The End.