in windows I would suggest you to use, Dev C ++, uses min-gw as base lib,
works as close to gcc as any can on windows, switch to linux while
developing, use Virtual Box [free/OSS] to host linux on same machine as
windows.
Answer to ur question, difference of compiler. One more you can try declare
Hi,
Based on most comments, The popular puzzle of the last week is
http://dailybrainteaser.blogspot.com/2011/03/21march.html?lavesh
* Please subscribe and follow this blog to show your liking to the blog.*
--
You received this message because you are subscribed to the Google Groups
Algorithm
re.findall(.{3} ,aaabbbcccdddeeefffggg)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For
You can implement above in dictionary,
a=000aaaaa
b={}
for x in a:
if b.has_key(x):
t=str(b[x])
t=t+x
b[x]=t
else:
b[x]=str(x)
print b
for x in b:
if 48 = ord(x) =57:
print b[x]
--
You received this message because you are
is there a better solution than O(n) ??? any datastructure possible
On Wed, Mar 23, 2011 at 8:20 PM, .bashrc saurab...@gmail.com wrote:
I may be wrong but if no==1000 then it becomes a[100] which is
beyond your array limit
On Mar 18, 12:31 am, KK kunalkapadi...@gmail.com wrote:
i m
Write a program that reads a file and convert it to an equivalent bf
code.(That is the on execution the bf code should yield the content of
file).Several approaches are possible,but try to develop it in such a way
that your resultant bf code is shortest.
--
Saurabh Singh
B.Tech (Computer
I dont think so even if a solution which appears to be better than o(n) can
actually be better.Because with this approach we are working upon each input
test case rather than storing them somewhere and traversing it again.The
only way this program can be improoved is in terms of memory i feel.
On
*what is bf code??
*
On Sun, Mar 27, 2011 at 4:45 PM, saurabh singh saurab...@gmail.com wrote:
Write a program that reads a file and convert it to an equivalent bf
code.(That is the on execution the bf code should yield the content of
file).Several approaches are possible,but try to develop it
Brainf**k code.(Brainf**k is a language)
example-If the input file contains HI then its equivalent bf code wud be
[+-].+.
--
Saurabh Singh
B.Tech (Computer Science)
MNNIT ALLAHABAD
--
You received this message because you are subscribed to the Google Groups
Algorithm
Hi,
We would like to invite you all to participate in ITRIX OPC 11(An
Individual Contest ), a 2-hour acm-icpc style online programming
competition, which is organized as a part of ITRIX 2011 , the
Technical fest of DIST ,College Of Engineering Guindy India.
Start time : Sunday ,27th March 2011,8
I have two questions :
1. How many files can a unix process open ( the same file and different
files )?
2. How many processes can open the same file (in unix) ?
--
regards,
chinna.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to
thanx to all.
On Sun, Mar 27, 2011 at 2:04 PM, D.N.Vishwakarma@IITR deok...@gmail.comwrote:
*Try Codeblocks compiler very close to gcc compilers for windows ..this
is by microsoft Freely available on microsoft site...
*
On Sun, Mar 27, 2011 at 1:33 PM, Joddy Street
Hi,
Thanks for replying. I am aware of that. But is there a practical
way of checking it
On Mar 26, 7:40 pm, Carl Barton odysseus.ulys...@gmail.com wrote:
If it can simulate a universal turing machine then it is turing complete
On 26 March 2011 22:34, Karthik Jayaprakash
Numbers are randomly generated and passed to a method. Write a program
to find and maintain the median value as new values are generated.
Thanks
Shashank
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
@all
wake up geeks
Thanks
Shashank
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For
you can imagine above code like block variables
int a;
{
int a;
while printing a here gives different values
}
Use GCC,which adheres to POSIX standards.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
Hi,
This is one approach to it:
1) Go to the first node in inorder traversal. Let the pointer be LP.
(Push the intermediate nodes to Lstack while doing this )
2) Go to the last node in inorder traversal. Let the pointer be RP.
(Push the intermediate nodes to Rstack while doing this )
We can do it in a recursive manner:
public int getRecursiveMedian(Node node)
{
int leftMedian = 0;
int rightMedian = 0;
if(node.getLeft() != null)
{
leftMedian = getRecursiveMedian(node.getLeft());
}
if(node.getRight() != null)
{
rightMedian =
while(LP-data RP-data){
The condition is wrong and would work only for BST. We could probably change
it to
while(LP != RP Lprev != RP)
Thanks,
Balaji.
On Sun, Mar 27, 2011 at 8:03 PM, Balaji Ramani rbalaji.psgt...@gmail.comwrote:
Hi,
This is one approach to it:
1) Go to the first
There are 0-255 file descriptrs available out of which 1st 3 are held by
std i/o,err.Theoriticaly you can have 256 files to be opened by the same
process but there may be limit on it which can be checked by the ulimit
command(for the exact options kindly refer to the man page of ulimit).
To view
hot katrina kaif wallpapers
http://cinyworld96.blogspot.com/2011/03/katrina-kaif.html
deepika padukone new stills
http://cinyworld96.blogspot.com/2011/03/deepika-padukone.html
beautiful aishwariya rai
Plz correct me if i am wrong
On Sun, Mar 27, 2011 at 4:50 PM, saurabh singh saurab...@gmail.com wrote:
I dont think so even if a solution which appears to be better than o(n) can
actually be better.Because with this approach we are working upon each input
test case rather than storing them
did anyone figure out a way to solve round 3 question? (the one where
u have an array with adjacent elements having a difference of 1 and u
need to see if a given number is in the array in less than O(n))
On Mar 26, 4:56 am, balaji a peshwa.bal...@gmail.com wrote:
anyone who has a good solution
As far as i think this question seems somewhat incomplete ...like what
does the distance signify and also how are the elements in the array
is poputatedare they in any particular
order or some relation exists between the two consecutive elements
If any one has done this problem please let
For the following question :
There is an array and the distance between any two consequent elements is
one(+1 or -1) and given a number. You have to check whether the number is in
array or not with minimum complexity.
Assuming the array may not be sorted, the following algo can be used:
Let a[]
@balaji: can u be litle more specific to the gmail chat box problem ???
And wat was ur answer???
On Wed, Mar 23, 2011 at 9:07 PM, balaji a peshwa.bal...@gmail.com wrote:
First I had a paper pen coding round. The questions were:
1) There are two sorted linked lists. Write a code to return
hello friends
pls suggest me that which algorithm problem i should implement that are ask
in most in interviews
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe
How to solve that Lucky Sequence Again problem...
i tried it using vectors...for small values it succeeded..
but it wasn't calculating for 10^10 or for large condition..
So what was the logic to solve the problem ???
--
You received this message because you are subscribed to the Google Groups
Also please do provide some test cases to comprehend this problem better
On Sun, Mar 27, 2011 at 10:34 PM, Raunak Agrawal raunak.ra...@gmail.comwrote:
Hi Ankit,
Please correct me if I am wrong:
1. There is no need of recursion and also I cant see any base
conditionso this is basically
Can you please provide the question...as I am not able to see the problem :(
On Sun, Mar 27, 2011 at 10:58 PM, Kunal Patil kp101...@gmail.com wrote:
How to solve that Lucky Sequence Again problem...
i tried it using vectors...for small values it succeeded..
but it wasn't calculating for 10^10
All solutions are opened in spoj
On Sun, Mar 27, 2011 at 11:03 PM, Raunak Agrawal raunak.ra...@gmail.com wrote:
Can you please provide the question...as I am not able to see the problem :(
On Sun, Mar 27, 2011 at 10:58 PM, Kunal Patil kp101...@gmail.com wrote:
How to solve that Lucky
If you're not concerned about being that formal then having conditional
branching statements and being able to write infinite loops would be a
pretty good indication.
On 27 March 2011 14:38, Karthik Jayaprakash howtechstuffwo...@gmail.comwrote:
Hi,
Thanks for replying. I am aware of that. But
what kind of question is this ?
the quality of this group is degrading day by day :(
On Sun, Mar 27, 2011 at 10:44 PM, hary rathor harry.rat...@gmail.comwrote:
hello friends
pls suggest me that which algorithm problem i should implement that are
ask in most in interviews
--
You received
To elaborate why; if your language suffers from the halting problem then
it's pretty safe to say it's turing complete and infinite loops would allow
you to achieve that.
On 27 March 2011 19:03, Carl Barton odysseus.ulys...@gmail.com wrote:
If you're not concerned about being that formal then
@pacific
I have the following answers to your questions :
1. A process can open number of files equal to the maximum value of
available file descriptors. This value is fixed in unix based systems
generally. Like in linux I think maximum descriptor value is 256. So
that much number of files can be
Hi,
Can anyone tell me the output of the following code?
#include iostream.h
int main()
{
.. if (true)
.. cout Pakistan will win the WorldCup 2011\n;
return 0;
}
--
Umer
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
there is another way:
group n array in two-two pairs of arrays merge them
second time you have n/2 array do the same again again, till you are
remaining with the 1 array
it is same like merge sort ,just we are starting from middle of the
process instead of at the end
it will give you
@vishwakarma : but we dont know n at compile time and memory should be
allocated at compile time .. so it should be error. at run time we
getting value of n...
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
*@Shady:* buddy lets not discourage som1 interested in learning :) this is
the purpose of this group..
*
@harry:* as some1 has said: there is no shortcut to success.. first go
through any good Datastructures/algorithms book.. try to code those
algorithms on ur own..once u feel u r comfortable with
You could do any order traversal to get the list of values. - O(n)
Apply the kth order statistic (where k = numNodes/2) to get the value - O(n)
Adjust the median depending on whether numNode is odd or even
On Sun, Mar 27, 2011 at 8:03 PM, Balaji Ramani
rbalaji.psgt...@gmail.com wrote:
Hi,
Theoretically, a language is Turing-complete if it computes all partial
recursive functions, ie functions that include all the basic functions and
is closed under composition, primitive recursion and minimization.
Basic Functions
zero () = 0
succ (x) = x +1
proj_i (x1, x2,..., xn) = xi
see this : http://denenberg.com/omf.pdf
On Sun, Mar 27, 2011 at 6:40 AM, bittu shashank7andr...@gmail.com wrote:
Numbers are randomly generated and passed to a method. Write a program
to find and maintain the median value as new values are generated.
Thanks
Shashank
--
You received
Its the theoritical value,the feasible value can be much less depending upon
the capacity of your computer
On Sun, Mar 27, 2011 at 7:02 PM, Gaurav Singh gogi.no...@gmail.com wrote:
@pacific
I have the following answers to your questions :
1. A process can open number of files equal to the
Yup that's right
On Mar 28, 2011 8:30 AM, Praveen Kumar praveen97...@gmail.com wrote:
Hi!
I don't know why you asked that question.
But, tell me if it is a C or C++ program. Anyhow, it will give compilation
whatever the compiler be.
Why?? cout is used in namespace 'std', if it is a C++
@rajul can u xplain how the bounty is (x-100)/6... ??
On Thu, Mar 3, 2011 at 1:43 PM, rajul jain rajuljain...@gmail.com wrote:
2500 gold
5 pirates
Set the initial 2 pirates gold equal as follows:
x = total gold
100 + [(x-100)/6] = 200 + [(x - 200 - 100 - ((x-100)/6)/6]
Rearranging and
the code will give error as there is nothing called true defined.
On Sun, Mar 27, 2011 at 10:38 PM, Umer Farooq the.um...@gmail.com wrote:
Hi,
Can anyone tell me the output of the following code?
#include iostream.h
int main()
{
.. if (true)
.. cout Pakistan will
46 matches
Mail list logo