Wait till night and walk through the first door.
On Wed, Jun 1, 2011 at 12:44 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote:
*Trap Door puzzle
*
*
*
**
*A man is trapped in a room. The room has only two possible exits: two
doors. Through the first door there is a room constructed from
given a single linked list, there is a possibility of pointer corruption,
modify the data structure to ensure that the data is not lost.
in my view a skip list is a good option, any other solutions?
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
--
Link : https://www.spoj.pl/problems/ACODE/
25114
BEAN’, ‘BEAAD’, ‘YAAD’, ‘YAN’, ‘YKD’ ‘BEKD’.
How many different decodings?”
My soln , but i get TLE.Please help.
#include iostream
#include cstdio
#include vector
using namespace std;
char * head;
int result[5001];
int count(char * a ,int size)
hey me getting wrong ans..can anyone pls help me out
here s my code
#includestdio.h
#includeiostream
#includestring
#includecstring
using namespace std;
unsigned long long a[5001]={0};
unsigned long long fun(string s,int n)
{
if(n==0) return 1;
if(a[n]) return a[n];
int c=0,d=0;
nice one :)
On Wed, Jun 1, 2011 at 12:49 AM, Naveen Kumar naveenkumarve...@gmail.comwrote:
Wait till night and walk through the first door.
On Wed, Jun 1, 2011 at 12:44 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote:
*Trap Door puzzle
*
*
*
**
*A man is trapped in a room. The room has
without indexes in erlang:
reverse(String) -
reverse(String, []).
reverse([], NewString) -
NewString;
reverse([Head|Rest], NewString) -
reverse(Rest, [Head|NewString]).
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this
a=++b*++b;
if b=3 initially, then a is coming out to be 25.why
--
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
you may want to read: http://c-faq.com/expr/seqpoints.html
On Wed, Jun 1, 2011 at 5:19 PM, himanshu kansal
himanshukansal...@gmail.com wrote:
a=++b*++b;
if b=3 initially, then a is coming out to be 25.why
--
You received this message because you are subscribed to the Google Groups
@saurabh singh
one lil addition make your code complete.
#includestdio.h
#includeconio.h
int main()
{
char s[20],t[30],*p,*q;
scanf(%s,s);
p=s;
q=t;
while(*(++p)!='\0');
p--;
while(p!=s)
{
*(q++)=*(p--);
}
*(q++)=*(p--);// first
Ya thanks.
On Wed, Jun 1, 2011 at 5:35 PM, rohit rajuljain...@gmail.com wrote:
@saurabh singh
one lil addition make your code complete.
#includestdio.h
#includeconio.h
int main()
{
char s[20],t[30],*p,*q;
scanf(%s,s);
p=s;
q=t;
while(*(++p)!='\0');
p--;
Tho a do while loop in place of the second while loop will do equally good.
On Wed, Jun 1, 2011 at 5:45 PM, saurabh singh saurab...@gmail.com wrote:
Ya thanks.
On Wed, Jun 1, 2011 at 5:35 PM, rohit rajuljain...@gmail.com wrote:
@saurabh singh
one lil addition make your code complete.
Hello,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.
*
*
*Please reply at soh...@panzersolutions.com
*
Hello,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.
*Please reply at soh...@panzersolutions.com
*
*Title
Dear Folks,
Wishes for the Day,
We need consultant for *Sharepoint Developer*
please share suitable profiles to prak...@panzersolutions.com
*Job title :Sharepoint Developer*
*Location :San Francisco,CA*
*Duration :12 Months*
*Rate :Market *
*NOTE: Local to CA // F-F Interview
even if the left over string length is 1 so that the recursion can be
fun(s,current_position-2), u still have the option for choosing a single
character... do u get it??
thats where u go wrong... :) the rec call should be return
fun(cur_length-1)+fun(cur_len-2) ...
On Wed, Jun 1, 2011 at 3:34
given an application that draws a circle ...you give center coordinates and
radius, how would you test this application
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
--
You received this message because you are subscribed to the Google Groups
This will be same as:
b=b+1;
b=b+1;
a=b*b;
Basically, all prefix increment and decrement operators will be executed
first. Similarly all postfix operators will be executed at last.
Anuj Agarwal
Engineering is the art of making what you want from things you can get.
On Wed, Jun 1, 2011 at 5:27
I am sure this question has come already but can anyone point me answer
again.
1.if user enter number 0 to 1. than what will we algorithum to
determine duplicate number (Note : user can not enter more than
1 number)
2. if we have a number in the range of [1...5] than we insert
http://spoj.pl/problems/CHAIN
can any one suggest how to go about...
animals can have only 3 different roots... how do u maintain it..
like u just came across a new animal.. how do u put it in a group..
this cant be done just by parent[i]==i stuff rite?? how to make sure
that there is only 3
oops.. :P that an if didnt notice tat :D
On Wed, Jun 1, 2011 at 8:34 PM, keyan karthi keyankarthi1...@gmail.comwrote:
even if the left over string length is 1 so that the recursion can be
fun(s,current_position-2), u still have the option for choosing a single
character... do u get it??
the simplest way is to use a hashmap, or an array arr[1] and keep track
of the number seen so far, eg. by making arr[num]=1, and checking while
inserting new elements.
second question is a bit unclear
On Wed, Jun 1, 2011 at 10:04 PM, Abhishek Goswami zeal.gosw...@gmail.comwrote:
I am sure
for second question explanation.
if you have array for 100 element a[100]. and you can enter element into
array from 1 to 5 range upto a[100].So you have array
a[100] which contain number from 1 to 5. what will be efficient algorithm
for arranging number in ascending order..
ex 1 2 5 5 5 3 4 1 1
No, time complexity for 1st is O(n).
for 2nd, a quick solution is to make one pass through the array to store the
frequency of 1,2,3,4,5.
Then using this information, a second pass to fill the array based on freq.
On Wed, Jun 1, 2011 at 10:53 PM, Abhishek Goswami zeal.gosw...@gmail.comwrote:
That may be true, but it is not guaranteed. Having multiple side
affects between sequence points is undefined by the ANSI standard.
Therefore an ANSI-compliant compiler could produce an executable which
causes monkeys to fly out of your nose.
Don
On Jun 1, 11:27 am, anuj agarwal
Assume that the people are more sparse or not uniformly distributed,
so that you don't need to cover all of the area to cover all of the
people.
I would think about something like this:
For each pair of two people who are not already within 100 meters of a
dustbin, but are within 100 meters of
if it is undefined by standard den y dont compilers follow it
On Wed, Jun 1, 2011 at 11:59 PM, Don dondod...@gmail.com wrote:
That may be true, but it is not guaranteed. Having multiple side
affects between sequence points is undefined by the ANSI standard.
Therefore an ANSI-compliant
Dear Professional,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.
*Please reply at
Dear Professional,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.
*Please reply at
Dear Professional,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.
*Please reply at
Q1. Hash Table (http://en.wikipedia.org/wiki/Hash_table)
Time complexity O(n) Space complexity O(n)
Q2. Count Sorting (http://en.wikipedia.org/wiki/Counting_sort)
Time complexity O(n + k) Space complexity O(k) here k = 5
--
You received this message because you are subscribed to the
other solution might be to use doubly linked list, even if one pointer gets
corrupt, there is other path to reach the destination.
On Wed, Jun 1, 2011 at 1:24 PM, Ashish Goel ashg...@gmail.com wrote:
given a single linked list, there is a possibility of pointer corruption,
modify the data
@Gaurav: You might want to say circular doubly linked list, didn't you ?
coz without that, its not possible to reach last node if we are at first
node or vice-versa.
On Thu, Jun 2, 2011 at 9:31 AM, Gaurav Aggarwal 0007gau...@gmail.comwrote:
other solution might be to use doubly linked list,
yes, basically all the groups of intersecting circles centered at each
person should be assigned 1 dustbin. 1 dustbin for 1 such group. I think
this will do.
On Thu, Jun 2, 2011 at 12:05 AM, Don dondod...@gmail.com wrote:
Assume that the people are more sparse or not uniformly distributed,
so
33 matches
Mail list logo