Given two sorted positive integer arrays A(n) and B(n), we define a
set S = {(a,b) | a in A and b in B}. Obviously there are n2 elements
in S. The value of such a pair is defined as Val(a,b) = a + b. Now we
want to get the n pairs from S with largest values. need an O(n)
algorithm.
--
Regards,
You are given an array. One integer is in the array twice and others
are unique. Find that no. O(n) Solution
--
Regards,
Navneet
--
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.
The important thing to notice here is that relative order of
characters is important and hence you should not look for just count
char based approaches.
On Wed, Aug 31, 2011 at 11:20 AM, Navneet Gupta navneetn...@gmail.com wrote:
Given two strings S1 and S2, Find whether another string S3 can
Given an array of size n wherein elements keep on increasing
monotically upto a certain location after which they keep on
decreasing monotically, then again keep on increasing, then decreasing
again and so on. Sort the array in place (ie. using only O(1) extra
memory)
--
Regards,
Navneet
--
Any suggestions/references for same? have done web programming in
past, but not so much creating websites with dynamic content/database
integration etc.
Also, i plan to start with WAMP model as i use Windows as my primary
dev platform.
--
Regards,
Navneet
--
You received this message because
Print tree in zig zag manner
1
/ \
23
/ \ / \
4 56 7
O/P: 1 3 2 4 5 6 7
--
Regards,
Navneet
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Hope the question is clear. Basically you need to print a given tree
such that spaces will depict the left/right relation at every level.
output should be something like
a
b c
d e f g
Levels are separated by new lines. Notice that space
Posting few questions which Playdom asked a friend of mine in telephonic
interviews. He had to write code in all cases.
1. Print m*n matrix in spiral form. Modify to make it iterative.
2. Print level order traversal or tree along with level information. Tree
need not be complete
a 1
b c
One thing i should mention in ques3, you have the parent pointer of node.
(so left, right and parent pointers can be used)
On Fri, Aug 26, 2011 at 3:22 PM, Navneet Gupta navneetn...@gmail.comwrote:
Posting few questions which Playdom asked a friend of mine in telephonic
interviews. He had
Needless to say. looking for an efficient solution rather than trying
successive numbers from given number for primality. Any method?
A general purpose use of above is to calculate N for hash functions. (index
= key%N where N is prime).
--
Regards,
Navneet
--
You received this message because
Given a string containing multiple words such that spaces between words is
missing. Also, you have a dictionary containing valid words.
Ex. Thatwouldbefantastic
Output a string with proper spaces inserted.
Output - That would be fantastic
The case of words like bandwidth present can be
Hello,
Many a times, i have noticed on blogs/sites that people emphasize a lot on
the importance of hash tables for interviews. Though i do not disagree
with their importance, i would really like to understand what kind of
questions can be solved best only by hash tables and are also dear to
Any feedback on Komli Media? How's their compensation like for college
freshers? Any interview questions you would like to share?
--
Regards,
Navneet
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Looking for a brief reference to solving recurrence relations. (Methods to
deduce functions from recurrence relations)
--
Regards,
Navneet
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Any takers?
On Thu, Aug 11, 2011 at 3:45 PM, Navneet Gupta navneetn...@gmail.comwrote:
Q. Design a concurrent hash table with as much as concurrency as possible.
System has multiple readers and writers. System will crash if a reader or
writer is reading or writing from a location which
Q. Design a concurrent hash table with as much as concurrency as possible.
System has multiple readers and writers. System will crash if a reader or
writer is reading or writing from a location which is being updated by some
writer. We need to prevent crash.
It is pretty much an open-ended
Hello folks,
I have seen some of the best possible string/array/tree based problems being
discussed on this thread but somehow i feel this group has been little
partial towards Graph problems.
Though, in most cases, interviewers don't ask Graph algorithms, but we, as
algo lovers, should give due
Looking for a book which explains networks like Bruce Eckel explains OOP :)
. Enough said
--
Regards,
Navneet
--
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
Write a recursive routine to add two numbers stored in Linked List in O(n)
time and return result in List 3
Lists are not to be reversed.
Example:
List 1 : 1 2 3 4 5 (Num1 - 12345)
List 2 : 6 7 8 (Num2 - 678)
List 3 (output) - 1 3 0 2 3 (12345 + 678)
--
Regards,
Navneet
--
You
Hi,
I was trying to accomplish this task with the following call , header
= ReverseList(header)
I don't want to pass tail pointer or anything and just want that i get
a reversed list with new header properly assigned after this call. I
am getting issues in corner conditions like returning the
Sending a test mail after re-joining the group. Please ignore.
--
Regards,
Navneet
--
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
It worked fine on sorted input.
On Wed, Jul 13, 2011 at 5:46 AM, Navneet Gupta navneetn...@gmail.com wrote:
OOPS..Bad miss :(
On Tue, Jul 12, 2011 at 11:53 PM, sunny agrawal sunny816.i...@gmail.com
wrote:
Algorithm in the paper says works only on sorted arrays
it is mentioned
Given 1000 million x 1000 million image, What information of
this image to be stored such that you can find the locations
when the given image has modi cations
--
Regards,
Navneet
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to
@Saurabh, just to let you know, compiler actually does that. Without
traversing the array (read specifying the array size), you are able to
free up all the memory being consumed by simply writing delete []a.
On Tue, Jul 12, 2011 at 10:13 PM, saurabh singh saurab...@gmail.com wrote:
and how
:54 PM, saurabh singh saurab...@gmail.com wrote:
can strlen do the same job?
I doubt...?
On Tue, Jul 12, 2011 at 10:51 PM, Navneet Gupta navneetn...@gmail.com
wrote:
@Saurabh, just to let you know, compiler actually does that. Without
traversing the array (read specifying the array size
I wrote the code as someone gave the reference of the paper where algo
to get max arithmetic subsequence was given.
For an input of {2,9,4,1,6,7,8,3,10}, i am getting an output of 3,
while it should be 5 for {2,4,6,8,10}
Below is the implementation, can someone help me understand where am i
Try this
1. Find the min and max in O(n) time.
2. For A.P. = mix to max/N , we find max possible subsequence.
For example
1,2,3,0,4,7,19,6,8,10,24.(could be more but trying to show the approach)
We see min = 1 and max = 8 hence we need to try for diff = 1 to 8/size(arr)
In this case, we
Sorry typo below
On Sun, Jul 10, 2011 at 12:49 PM, Navneet Gupta navneetn...@gmail.comwrote:
Try this
1. Find the min and max in O(n) time.
2. For A.P. = mix to max/N , we find max possible subsequence.
For example
1,2,3,0,4,7,19,6,8,10,24.(could be more but trying to show
(pause);
}
On Thu, Jul 7, 2011 at 9:10 AM, Navneet Gupta navneetn...@gmail.com wrote:
@Piyush, could you elaborate your approach with Linked List?
From what i am getting, even with Linked List, you would need two
traversals at least.
On Thu, Jul 7, 2011 at 2:07 AM, Piyush Sinha ecstasy.piy
Can we do this?
Start with a node, take an edge say between x1 and x2 of length k1.
Take another node x3 and check distance between x1 and x3 (k13) and x2
and x3 (k23)
Depending on whether k13 or k23 is bigger, the node x3 between x1 and
x2 or away from x1 and after x2.
Proceeding in this way
sys
print .join((sys.argv[1].split())[::-1])
On Thu, Jul 7, 2011 at 3:12 PM, Navneet Gupta navneetn...@gmail.com wrote:
@Vishal, can you see if your program works well for more than single
space between words? Not sure how split functions helps.
BTW, Perl also is very strong language
, Jul 7, 2011 at 3:36 PM, Navneet Gupta navneetn...@gmail.com wrote:
@Vishal,
Don't confuse printing in reverse with actually modifying the actual
string to reverse word order in it :)
On Thu, Jul 7, 2011 at 3:34 PM, Vishal Thanki vishaltha...@gmail.com wrote:
@Navneet, it works with multiple
Okay, I think NO EXTRA SPACE is what i should have mentioned clearly.
Anyways dude, i appreciate the point of simplicity which you are
trying to show.
On Thu, Jul 7, 2011 at 3:45 PM, Navneet Gupta navneetn...@gmail.com wrote:
I meant, having the result in same string which was used as param
Hello,
Can someone explain me why does linker perform the resolution when function
is being defined in unmanaged code and is being used in managed code with
signatures like
public static extern Foo() .
As i understand, the function should be a static one in unmanaged code and
hence static
@Vishal, still the array str1 is also 10 bytes only, I know that memcpy
overwrites the null character but not sure then what is the correct approach
if i still want to use memcpy. Thoughts?
On Fri, Jul 8, 2011 at 10:51 AM, Vishal Thanki vishaltha...@gmail.comwrote:
you are overwriting
See diff documentation. It's an application of Longest Common
Subsequence problem.
http://en.wikipedia.org/wiki/Diff
On Wed, Jul 6, 2011 at 11:12 AM, priyanshu priyanshuro...@gmail.com wrote:
What is the most efficient way to compare two text documents?? Also we
need to find the percentage by
93747. Just defined the variables as x^2, x, y, x+1, 14-y and solved
it with information in 5th statement.
On Wed, Jul 6, 2011 at 5:28 PM, rupali chauhan
chauhanrupal...@gmail.com wrote:
Solve Dis!
A Boy Forgot His
Pin-Code Which Was Of 5 Digits,
But Luckily He Remembered
Some Hints How To 2
The basic reason is graduation.
Since C++ is object oriented and designers wanted to provide more
safety in case of dynamic memory allocations, they defined new and
delete operators to handle allocation and deallocation.
If you see malloc, if does only one function - allocate the memory,
with
I think somebody on this thread has asked this question but i am not
able to find that.
Question was if a string is like my name is ram, then output should
be ram is name my.
Wrote the code for same, so sharing.
#includeiostream
#includestring
using namespace std;
void SwapStringChars(string
tushicom...@gmail.com
wrote:
good job
but how can this be done in one traversal as asked on the Adobe Interview
Questions thread.
On Wed, Jul 6, 2011 at 9:49 PM, Navneet Gupta navneetn...@gmail.com
wrote:
I think somebody on this thread has asked this question but i am not
able to find
Just to let you guys know it's a good legitimate problem with no trick
answer. People who don't know the solution should try.
On Wed, Jul 6, 2011 at 10:44 PM, Tushar Bindal tushicom...@gmail.com wrote:
Eggs can never break the building.
So dropping the eggs won't break the building - whether
??
On 7/6/11, Tushar Bindal tushicom...@gmail.com wrote:
I read that solution.
But the same doubt as Navneet which I think you also raised i one of your
posts on that thread
On Wed, Jul 6, 2011 at 10:34 PM, Navneet Gupta navneetn...@gmail.comwrote:
Saurabh,
I understood your solution
Anyone for Q10, i wonder if it can really be solved in O(n). Very
obvious O(nlogn) is what I know
On Thu, Jul 7, 2011 at 1:25 AM, KK kunalkapadi...@gmail.com wrote:
for Q5 change the expr into postfix and then build expression tree...
but is expression tree same as parse tree??
correct me if i
In this case, i think we will get sizeof(int) size of class because
here the objects will automatically be referring to different memory
location because of non-zero class size. Empty class looks like a
special case where 'bonus' size is allocated.
On Thu, Jul 7, 2011 at 11:04 AM, oppilas .
I solved it without any temp variables and the solution works like magic.
Suppose the sequence is A1, A2, A3, A4, A5 B1, B2, B3, B4, B5
Now here N = 5. I had to perform 1+2+3+4 = N(N-1)/2 swaps to get the
desired order.
The scheme work like this.
At step 1, perform only one Swap - A5, B1
Now
I think you guys are on different page. There is a difference between
substring and subsequence.
http://en.wikipedia.org/wiki/Subsequence#Substring_vs._subsequence
This question asks what is the longest SUBSTRING which is unique
(there could also be none or multiple if lengths are equal)
Tree has an extra pointer next apart from left and right. Objective
is to set next pointer to point to node successor in the tree.
Following the next pointer, we would be able to produce sorted list.
Looking for both a recursive and non-recursive approach.
--Navneet
--
You received this
://en.wikipedia.org/wiki/Threaded_binary_tree
On Mon, Jul 4, 2011 at 11:34 PM, Navneet Gupta
navneetn...@gmail.comwrote:
Tree has an extra pointer next apart from left and right. Objective
is to set next pointer to point to node successor in the tree.
Following the next pointer, we would be able
If you can, refer to Constants chapter in Bruce Eckel. He he smartly
explained how const are different for C C++.
The e-book is free to download from net.
On Mon, Jul 4, 2011 at 2:50 AM, Gene gene.ress...@gmail.com wrote:
Why do bicycles have 2 wheels and tricycles 3? The designers made
them
It is a simple algorithm
1) If node has no child, simply delete
2) If node has one child, replace node's data with child's data and
make the subtree child of node, delete child.
3) if node has two child, find the node with min key in right subtree
(or max in left subtree), call it x, replace
I think one rule of thumb for reading pre and post increment operators is
1) For Pre - Increment the value and use it (++x)
2) For Post - Use the value and increment it (x++)
Similar is for pre and post decrement.
I am not very good at commenting the generality of above but in simple
usages
:53 PM, Navneet Gupta navneetn...@gmail.comwrote:
Ideally, yes it can. Though i would be happy even if someone gives a
good answer for non-negative values.
On Mon, Jun 20, 2011 at 6:28 PM, Akshata Sharma
akshatasharm...@gmail.com wrote:
@Navneet: does the set contains negative
This is a recently discussed problem in this group.
Refer to subset sum problem. http://en.wikipedia.org/wiki/Subset_sum_problem
On Sun, Jul 3, 2011 at 6:34 AM, Edmon ebeg...@gmail.com wrote:
I need a help with this dynamic programming problem please.
It is from the entrance exam practice
I wonder why people have discarded the idea of Hash map here.
Searching is obviously the most important task here and if we are to
assume that names can be uniformly hashed over a table of 1000 rows
with each row containing 1000 names each.
Further optimization can be achieved by having names
Sunny, the solution is great. Could you give me some ideas around how
do you approach such problems in recursive manner?
Recursion is never easy for me to understand as it is difficult to visualize.
On Tue, Jun 21, 2011 at 11:52 PM, sunny agrawal sunny816.i...@gmail.com wrote:
see this
http://en.wikipedia.org/wiki/List_of_algorithms
How many do you know? :)
--Navneet
--
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
One such resource
http://placementsindia.blogspot.com/search/label/Operating%20Systems
On Mon, Jun 27, 2011 at 2:01 PM, Nishant Mittal
mittal.nishan...@gmail.com wrote:
plz recommend me some good sites for OS interview questions...
Thanx in advance
--
You received this message because
String matching can be performed in linear time with KMP algorithm.
could you say what more optimization you are looking for here?
Sent from my Windows Phone
--
From: prateek gupta
Sent: 23/06/2011 11:17
To: algogeeks@googlegroups.com
Subject: [algogeeks] string
Even I am getting permission error in accessing the google doc
Sent from my Windows Phone
From: pullasunil
Sent: 23/06/2011 12:14
To: Algorithm Geeks
Subject: [algogeeks] Re: If any one have algorithms for interviews by
adnan aziz ebook... Please mail ...
Can you mail me the book for Algorithms
Let the array elements be 2,3,5,10 1,4,8,12.
Have two index variables m and n. Intially m will point to 2 and n to 1.
1. Compare the elements in m and n.
2. If elem[m] elem[n] swap, increment n
3. else increment m and go to step 1.
4. end if m becomes the starting value of n or n reaches end
Time-Date was 12:34 5/6/78
On Tue, Jun 21, 2011 at 1:31 PM, Lavesh Rawat lavesh.ra...@gmail.com wrote:
Extraordinary Riddle 21 june
Something Extraordinary happened on May 6th 1978 at 12:34am what was that?
Update Your Answers at : Click Here
Solution:
Will be updated after 1 day
--
One crude idea could be to generate permutations of all substrings of
seq2 and then check if any of such permutations is a substring of
seq1. Maintaining a count for chars in substring generated and
updating it every time we get a higher value.
^thinking for better solution.
On Tue, Jun 21, 2011
I think searching for palindromes with same starting and ending
characters and required lengths to construct the rectangle is one
tricky way i can think of.
For generic solution, a good data structure i can think of is a table
of trees. We need to find the shortest and longest word and then
Given a set of integers , find a set of numbers such that they sum to a
given number k .
Notice the set of numbers can have 2 or more than 2 numbers.
--Navneet
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
20, 2011 at 12:09 PM, oppilas . jatka.oppimi...@gmail.comwrote:
I think its a NP problem. The solution complexity can go up O(2^N) in worst
case.
On Mon, Jun 20, 2011 at 11:55 AM, Navneet Gupta navneetn...@gmail.comwrote:
Given a set of integers , find a set of numbers such that they sum
We have an unlimited number of dice at our disposal. Let's roll the
die. If the outcome is 1, 2, or 3, we stop; otherwise, if it is 4, 5,
or 6, a corresponding number of dice are rolled. For example, if the
first roll gives 5, then we roll 5 dice, and so on. This procedure
continues for every
binary search in rest of the array : order nlogn
hence u get two elements which sum up to K in order nlogn
On Mon, Jun 20, 2011 at 12:14 PM, Navneet Gupta navneetn...@gmail.com
wrote:
Right, in the worst case, complexity with be O(2^N).
So what are the possible optimizations here? Would
Can you discuss how did you arrive at this value?
Sent from my Windows Phone
--
From: sunny agrawal
Sent: 20/06/2011 22:53
To: algogeeks@googlegroups.com
Subject: Re: [algogeeks] Coin Chain Reaction
and Expected value should be
2.5^(N-1)*(7/2)
--
Sunny Aggrawal
IMAGINE THAT YOU have three boxes, one containing two black
marbles, one containing two white marbles, and the third, one
black marble and one white marble. The boxes were labeled for
their contents-BB, WW and BW-but someone has switched
the labels so that every box is now incorrectly labeled. You
does not contain while, it can either have BB or BW ball.
But it must have BB ball inside it otherwise, we will end up getting BB in
correct labeled BB box.
On Tue, Jun 21, 2011 at 12:11 AM, Radhika Renganathan
radi.coo...@gmail.com wrote:
one drawing ?!
On 6/21/11, Navneet Gupta
I have come up with this approach. Take first two arrays and compute the min
absolute difference between two elements. Then with this mingap2 between A1
and A2, add each element and check what is the least value possible.
Below is the code. Think it should work. I have not considered negative
@Sunny, it is good that you follow Bruce Eckel, but copy pasting the exact
thing? :)
On Thu, Jun 16, 2011 at 7:34 PM, keyan karthi keyankarthi1...@gmail.comwrote:
hi friends is a string literal.. ie the string hi friends is stored
somewhere and a pointer to its base address is returned to
at 8:06 PM, Navneet Gupta navneetn...@gmail.comwrote:
@Sunny, it is good that you follow Bruce Eckel, but copy pasting the exact
thing? :)
On Thu, Jun 16, 2011 at 7:34 PM, keyan karthi
keyankarthi1...@gmail.comwrote:
hi friends is a string literal.. ie the string hi friends is stored
, snehi jain snehijai...@gmail.com wrote:
wont recursion will also be resource (time) intensive because of the
multiple function call which is not observed in iterative procedures.
On Tue, Jun 14, 2011 at 7:30 AM, Navneet Gupta navneetn...@gmail.comwrote:
Recursion is the best way to write compact
This looks like a good problem. Could you confirm if string contains only
two characters as you mentioned in both examples or it is a general string
with any characters.
On Tue, Jun 14, 2011 at 6:33 PM, bittu shashank7andr...@gmail.com wrote:
I found one interesting question
Given a string s
Put one red ball in one jar and rest 99 balls in other jar.
Probability in that case is 1/2*1 + 1/2*49//99
On Tue, Jun 14, 2011 at 7:45 PM, Vishal Jain jainv...@gmail.com wrote:
Folks,
This question was asked during a screening process of a product based
company. Please answer.
Recursion is the best way to write compact programs for what might
seem as tedious tasks to do.
Dynamic Programming is an alternate to recursion when problems possess
characteristics like suboptimal substructures and overlapping
subproblems.
Dynamic Programming is a iterative way of doing tasks
Hello,
I would really appreciate if someone can help me get an intuitive
understanding of XOR over a range of numbers.
I have seen it's usage is a couple of problems where duplicates are involved
and though ultimately i can see how it is solving the problem, i still feel
like checking the
Take n from user and print 1 to n. No loops like for/while/do-while are
allowed to use.
--Navneet
--
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,
No.
On Fri, Jun 10, 2011 at 9:26 PM, nagajyothi gunti
nagajyothi.gu...@gmail.com wrote:
Can goto statement be used?
On Fri, Jun 10, 2011 at 11:42 AM, Navneet Gupta navneetn...@gmail.comwrote:
Take n from user and print 1 to n. No loops like for/while/do-while are
allowed to use
Using recursion would be like using loops only. Also i believe the recursion
used would be tail recursion and one can change tail recursion to loop based
non recursive method.
Okay, giving all a hint. Think classes and objects.
On Fri, Jun 10, 2011 at 9:26 PM, Navneet Gupta navneetn
];
}
this will print from 1 to 5
am i right?
On Fri, Jun 10, 2011 at 9:30 PM, Navneet Gupta navneetn...@gmail.comwrote:
Using recursion would be like using loops only. Also i believe the
recursion used would be tail recursion and one can change tail recursion to
loop based non recursive method
Try placementsindia.blogspot.com , it has a good collection of
problems specific to placements.
On Thu, Jun 9, 2011 at 12:23 PM, coder dumca coder.du...@gmail.com wrote:
I need some more books specialy on algo ds and puzzles
On Wed, Jun 8, 2011 at 4:07 AM, coder dumca coder.du...@gmail.com
I would recommend you to read complete Java Reference book by Herbert
Schildt, it will take you nicely through the basics of creating window
based applications. First read the chapters on Applets and AWT and
then you should be able to easily and naturally graduate to using
Swing.
On Thu, Jun 9,
of Applets and AWT and have started getting acquainted to
Swing
but the problem lies where to start from. Its like I want a small example or
few starting steps.
Complete Reference is the book that i refer.
On Thu, Jun 9, 2011 at 1:48 PM, Navneet Gupta navneetn...@gmail.com wrote:
I would recommend
So i assume your ask is given a string, check if it can be formed with the
regular expression you have. Is that correct?
The above can be implemented easily with stacks.
Ex - Reg Expression - a*bc*
And String - aabccc
Put all instances of char that are consecutive on the stack and then pop the
The answer to second question is simple. XORing all the elements
should do it for you.
On Thu, Jun 9, 2011 at 3:15 PM, Dumanshu duman...@gmail.com wrote:
Q1. I have a file in which there are supposed to be 4 billion
numbers,
starting from 1 to 4,000,000,000 but unfortunately one number is
Insertion sort also would do.
On Thu, Jun 9, 2011 at 4:22 PM, D.N.Vishwakarma@IITR deok...@gmail.com wrote:
thanx for suggestion
On Thu, Jun 9, 2011 at 4:08 PM, sunny agrawal sunny816.i...@gmail.com
wrote:
Discussed many times,
1) add some lines to merge sort
2) use Binary indexed tree
in an array in
O(nlogn) complexity .
how insertion sort will do in O(nlogn)?
On Thu, Jun 9, 2011 at 4:27 PM, Navneet Gupta navneetn...@gmail.com wrote:
Insertion sort also would do.
On Thu, Jun 9, 2011 at 4:22 PM, D.N.Vishwakarma@IITR deok...@gmail.com
wrote:
thanx for suggestion
On Thu, Jun 9
What could be a good strategy to check if the given Sudoku puzzle is
indeed solvable? Can you think of anything other than actually trying
to solve it and later finding it is not solvable.
Even good ideas for optimizations are welcome.
--Navneet
--
You received this message because you are
A little different but related problem is to determine whether a
Sudoku puzzle is easy, medium or hard to solve. Here, solveability is
guaranteed.
On Tue, Jun 7, 2011 at 2:31 PM, Navneet Gupta navneetn...@gmail.com wrote:
What could be a good strategy to check if the given Sudoku puzzle
Well, one approach is have all possible sums stored for debits and
credits and match the sums.
Basically, you can create a multi-list type DS (if i remember the name
correctly) and store the SUMS and with formative elements in linked
lists being pointer by node containing sums
SUM 1 - Header 1 -
Can't think of any trivial/straight forward way of doing that other
than dereferencing pointer.
On Sat, Jun 4, 2011 at 3:34 PM, D.N.Vishwakarma@IITR deok...@gmail.com wrote:
I'm saying that int *x=new int(3); is a statement .
I want to find value at location allocated by new which is 3 in this
93 matches
Mail list logo