76 Solved Topics
Remove Filter
|
|
Greedy algorithm is an algorithm based on the greedy approach, which is commonly used to find the globally optimal solution by selecting the locally optimal solution at each step, considering the given constraints. The application of the greedy algorithm in computer monitoring software can include several aspects: File scanning: When … |
|
I am trying to understand Boyer Moore algorithm & KMP algorithm (Knuth Morris Pratt)? I tried some places like GeeksForGeeks, TutorialsPoint etc. But I have still some doubts. If you guys have some resources or videos where these algorithms are explained in somewhat simple terms, please share them. First I … |
|
how do i see the youtube aglorythm?. i dont know how i see it. |
|
I am making a tic tac toe game, and have completed it. Now I am trying to implement a library to my code and I chose ncurses, because it seems easier to add and will allow me to change the color of the input for the game. However, I can't … |
|
I tried alot to print this arrow with random generated values which are 0101 , every time it should be differnt, please help me out thanks :) ![Untitled1.png](/attachments/large/4/c843d1e3a2cf1464dc1f1eb7c0d4a68a.png) |
|
hello, i just set goal of mastering algorith and i just get started i have an algorhtm for insert sort and i when i write it in c it is not sorting this is the algorith for j D 2 to A_length key = A[j] // Insert A[j] into the … |
|
How to implement bucket sort in C using Linkedlist.. Or any weblinks please share... |
|
I have a problem with my pseudocode: Declare Integer p1 Declare Integer p2 Declare Integer p3 For p1 = 1 To 3 For p2 = 65 To 66 For p3 = 6 To 8 Display p1, p2, p3 End For End For End For This would display 18 combinations. But, … |
|
There is a problem of facility location that I solve with genetic algorithms. I can get good results. So I would like to compare my genetic algorithm complexity O(n^2) with the brute force algorithm. But I am not getting an answer. (n = number of individuals in my population, usually … |
|
I am writing a code for a user to choose numbers in a progress bar. For some reason the progress bar does not fill up or empty when the int progress is not exact. For example: The progress bar value is 5 at the moment. The user chooses 250 Million … |
|
Hi all , i want to cast the output of fuzzy logic algorithm into any another type (float , int ,double..), i tried this with usual methods but there is no change.. This is the complete java code public static void main(String[] args)throws Exception { String filename = "output.fcl"; FIS … |
|
Hi Everyone, I have a project from school which is a console application that takes hard-coded items and process those inside of one of my custom class which intherit from a list of strings. Then, it processes those items and apply the Apriori Algorithm (I cannot use any existent package … |
|
Hello all. I apologize in advanced if this has been asked before but I have not been able to find this information via google or searching here. Everything I found is related to how a for loop works. I know how to use a for loop in python and what … |
|
This is what I have so far.....any advise? Output does not give only one largest and smallest number from a file and also there are multiple averages of numbers..... thank you in advance. |
|
Hello. I want to submit a code stuff with an explanation. It is not a valid code. Someone can help me to find error? <code> ** ** I'm trying to build a program that change numbers writen in decimal notation. If we consider each ranges of numbers: unities, 10-es, 100-es … |
|
Hello all! I am trying to take a string that has mixed uppercase and lowercase chars and then convert it to lowercase. I am doing the following line of C++ code: transform(theReadMessage.begin(),theReadMessage.end(),theReadMessage.begin(),theReadMessage.end(),::tolower); //theReadMessage is a string to convert to lowercase and my C++ xCode debugger gives me this message `Too … |
|
Yes I'm too worry about this Update. Because my website still not responsive. Could anyone say something please, This **21st April Google Algorithm update** will penalize non-mobile friendly websites? I'm waiting for your valuable response. |
|
This is a homework problem; however I just want some direction. I have to write a module graph.cpp that implements djikstra's algorithm. so far i am at the reading in module and am trying to make an array of structures. here is the code. [code=c] // Zachary Dain // CSCI … |
|
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: // … |
|
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 … |
|
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 fellow programmers, i am doing an assignment for class and i am having a bit of trouble. So the assignments reads Given two sorted (in ascending order) lists of size M and N, write an O(M+N) algorithm to find the sorted (also in ascending order) union of the two … |
|
At the moment I am trying to decide which book to buy, there are many that I think would be very interesting, but some are most likely beyond me. The books in my list, along with my thoughts on them are: Concrete Mathematics (I believe this is probably too advanced … |
|
Hello, As may be apparent from my previous posts, I am in a "If its worth doing, its worth overdoing" sort of competition with a friend of mine. Our goal is arbitrary precision integer arithmetic. I think I am close to getting the data storage working, but now I want … |
|
Hello. I was reading http://xkcd.com/287/ while bored and thus decided to write a program that would solve such np complete problems. Here is what I got: #include <iostream> #include <vector> using namespace std; template <typename T> T NPMenuProblem(T desired, vector<T> options, vector<T> &ret) { vector<T> save=ret; T remainder; T min=desired; … |
|
I am having problem on removing root, moving the lastnode to the new root and applying the downheap. Here is my code snippet #include <iostream> #include "heap.h" heap::heap() { data=new myvector<heapData> (10); size=0; heapData item; item.key=0; item.data=0; insertItem(item); } heap::~heap() { delete data; }; void heap::insertItem(heapData item) { data->insertAtRank(size,item); size++; … |
|
alright guys so am havign trouble finding a way to search for seats that are toghether, my pgram consists of a theater with 20 x 10 seats, i have created a seatSelection class and the theater file which has the main. Ok so heres a sample output of how it … |
The End.