405 Topics

Member Avatar for
Member Avatar for saimadanmohan

In the brute force pattern matching algorithm when all the characters in the pattern are unique then brute force can be implemented in Big-oh(n) complexity where n is the length of the string (reference: introduction to algorithms). can anyone help me with the algorithm? Thanks in advance

Member Avatar for stevedaniel
0
267
Member Avatar for can-mohan

Hi , I need to implement efficient search algoritham for comma separated list of MSISDN's that needs to be loaded in memory (left side of '|') character. Followed by the comma separated series of MSISDN's that needs to be searched in the above huge list(millions)(right side of '|' character). Example: …

Member Avatar for mike_2000_17
0
384
Member Avatar for inspire_all

Suppose i have a 4 queens problem then i know what state space tree means but i am not able to get what does** solution space** mean?Also what is** difference between brute force and backtracking technique**s.I know that in backtracking if you don't get to a state whose bounded function …

Member Avatar for inspire_all
0
212
Member Avatar for littledevils326

I am wanting to measure the performance of an algorithm which I've created, and for some reason the value decreases significantly as I run through my loop

Member Avatar for ObSys
0
237
Member Avatar for Schol-R-LEA

I would like to propose a link thread for posting listings of sites on CS topics not tied to a specific language. Two that come to mind as being relevant to some of the more common questions would be the [OS Dev Wiki](http://www.osdev.org), and the similarly themed but less established …

Member Avatar for sanjit.dasgupta2
1
352
Member Avatar for Kyle777w

Hello, I've got a question about a project in my operating systems class. The task was to create a program that lets the user choose a variety of cpu scheduling algorithms and simulates them with random data or data from a file. I've already done it for first come first …

0
294
Member Avatar for wadeed

I want to create an algorithm which shows how to create a linked list that could store a database of animals ie its species and physical features etc can any one help me

Member Avatar for amina.bm
0
172
Member Avatar for shwetakharat84
Member Avatar for jimmyovid

Write an algorithm that performs Binary operation such as Addition, Subtraction, Multiplication and Division of Rational numbers.

Member Avatar for deceptikon
-1
246
Member Avatar for TalentedIndividual

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 …

Member Avatar for tinstaafl
0
519
Member Avatar for SAM2012
Member Avatar for masijade
0
88
Member Avatar for pwolf

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 …

Member Avatar for john alternate
0
372
Member Avatar for kal_crazy

I am doing a school project which is an airplane collision detection system. Can anyone show me a few examples or pseudocode of implementation of closest pair algorithm O(n^2), O(n log^2 n), O(n log n)?

Member Avatar for DawnofanewEra
0
505
Member Avatar for srivardhanms

Hi, Can anyone give me an efficient algorithm for adding an element into a sorted matrix of linked list such that the size of the columns remains constant. Thank-you, Sri

Member Avatar for srivardhanms
0
473
Member Avatar for JadeRayne

I'm pretty rusty on my Java skills but I was trying to write a program that prompts the user to enter a string and displays a maximum length increasing ordered subsequence of characters. For example, if the user entered Welcome the program would output Welo. If the user entered WWWWelllcommmeee, …

Member Avatar for JamesCherrill
0
509
Member Avatar for pssubash

I need all the possible combinations alphabets, numbers (a-z0-9) , _(underscore) and .(dot) which must satisfy the below conditions Please use between 6 and 30 characters. Please use only letters (a-z), numbers(0-9) The first character should be a letter (a-z) or number. The last character a letter (a-z) or number. …

Member Avatar for minitauros
0
135
Member Avatar for stevanity

Hi, I am working on a problem. I have a set of advertisements that I need to print on a paper. The ads may be half page, quarter or full page. The advertiser may specify the location (geographical area - out of finite set of areas), intensity (number of flyers …

Member Avatar for rubberman
0
118
Member Avatar for nirbilcahn

http://ideone.com/H7YIwR Here's my code to find palindrome in string..But surely it's too slow..Is there any good algorithms for such problems..And for some cases it's not giving the right answer.Thanks for the help.

Member Avatar for vijayan121
0
406
Member Avatar for Mantroskylo

This is an assingment i've been working on but since this is a merge between two previous developments i need a little help solving my issue here that would be highly appreciated. In a nutshell what this program needs to do is recieve a .txt file create a vector holding …

Member Avatar for rubberman
0
288
Member Avatar for Labdabeta

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 …

Member Avatar for Labdabeta
0
982
Member Avatar for Vasthor

// 9-2. If we define the name function as a plain, nonconst member // function, what other functions in our system must change and why? based on the question, the answer would be // answer bool compare(const Student_info&, const Student_info&); // because this function uses the member function as it's …

Member Avatar for mike_2000_17
0
268
Member Avatar for Jenniferting

Hi guys, im currently doing Conway's game of life and i'm almost there. The variable and all is in German since im studying here in Germany but i think one can still understand the code. There's one thing I need help with, which is with the Glider (Gleiter). When i …

Member Avatar for sepp2k
0
236
Member Avatar for iraklakis

Don't know why my code crashes when j=317. I thought was the matrix dimensions, so tried some numbers. Nothing particular happened. Every help would be very usefull. #include <stdio.h> #include <math.h> int main(){ int T,i,j,t,c,r[T],Jmax,Z,k; float v[10],R[10],EBNo[10],trapserv[10],a[10],w[10],Pblock[10]; float L[j+1][j],B[T+1][j+1],b[T+1][1000],P[T+1][j+1],q[j+1],qnorm[j+1]; float sigma,mtimi,mtimic,CV; float Nmax,g,W,EIother,C,Nown,No,totofcell,sumq; float Gamma,bita,QA,LA,BA; float x; //Data input// ` …

Member Avatar for iraklakis
0
218
Member Avatar for Labdabeta

Hello, I am very familiar with most of the sorting algorithms that are taught in first year university (as I just finished my first year in software engineering at the University of Waterloo). As such my current go-to sorting algorithms are insertion (on mostly pre-sorted data, or data where I …

0
219
Member Avatar for williampritchar

Now every one confuse what strategy adopt to get good rank on google after latest update of panda and penguin. Please suggest me the best strategy which increase visibility on SERP.

Member Avatar for gujaratcarz
0
217
Member Avatar for Kesarion

I have an array of objects that I need to iterate through in order to get three items. The parts of the object important in this context are: value and type. I need to find the first three items from the array that have the greatest value sum and are …

Member Avatar for Kesarion
0
255
Member Avatar for Labdabeta

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

Member Avatar for Labdabeta
1
204
Member Avatar for Sonia11

I am in a small doubt of how to proceed to the next stage. 1. I have used im2col which basically turned gray-scale image into vector. 2. I have used the function vector quantization lbg algorithm which gave the VQ codebook as the output. I understand that the image I …

0
136
Member Avatar for dan.gerald

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++; …

Member Avatar for buterous
0
492
Member Avatar for alexamicaa

I have NO IDEA how to use Python. Best answer if you write the full program! Please help me! I will be forever grateful! Accept / Reject Monte Carlo Part I: Goal: Write a python program that will: 1. define a function for a specific probability density function f(x), 2. …

Member Avatar for sepp2k
-2
663

The End.