--
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 more options, visit this group at
ht
Could someone throw some light on this OOPS question. I detailed
explanation would be of immense help.
Design an OO representation to model HTML.
How do they represent tags and content? What about containment
relationships? Bonus points if they know that this has already been done a
bunch of times
thanks @dave
*Shashi Kant *
***"Think positive and find fuel in failure"*
*System/Software Engineer*
*Hewlett-Packard India Software Operations.
*
On Mon, Oct 1, 2012 at 10:42 PM, Dave wrote:
> @Shashi: It has been discussed before, and an O(n^2 log n) solution is
> outlined at
> https://gr
@Shashi: It has been discussed before, and an O(n^2 log n) solution is
outlined at
https://groups.google.com/d/msg/algogeeks/fBhXY9aUNJ0/CTB_p7uO8YYJ and is
given in more detail at
https://groups.google.com/d/msg/algogeeks/fBhXY9aUNJ0/0S0zK6HdKdMJ.
Dave
On Monday, October 1, 2012 12:00:19 PM
Given a two dimensional graph with points on it, find a line which passes
the most number of points.
Can somebody suggest possible ways to do it.
*(or point me to the post if this problem is already discussed)*
*Thanks & Regards,*
*Shashi Kant *
***"Think positive and find fuel in failure"*
htt
Do we need to handle cases when the same string will appear again??
In that case we can sort individual array and remove duplicates.
On Mon, Oct 1, 2012 at 9:54 AM, Rahul Singh wrote:
> check this out..
>
> #include
> #include
> using namespace std;
>
> void print_sets(string *s,int pos,int n,ch
A solution given below taken from "cracking the Coding interview " book...
Solution is create a Comparator and a small change in "compare" method is
that u sort the characters of that string and then compare.
and just sort the arrays, using this compareTo method instead of the usual
one.
Arrays.s
not sure what interviewer meant here, does not look like compiler dependent
code,
and BTW, last recurrence yield "5" :) and not 8,
one possible def is, you have a function with no return and compiler
is independent for choosing what to return in this case, just a guess. Not
sure about cpp stand
still there is no improvement, compiler will generate the code to compare
with zero here. what you have accomplished is , hide it from human eyes
On Monday, 1 October 2012 15:25:09 UTC+5:30, Navin Kumar wrote:
>
> @atul:
> still it won't compare 0 th element. Slight modification in your code:
>
@atul:
still it won't compare 0 th element. Slight modification in your code:
n=*sizeof(arr)*;
do
{
if(elem==arr[*--n*])
print found;
}while(n);
On Mon, Oct 1, 2012 at 9:50 AM, atul anand wrote:
> yes, but there no need of checking outside the loop
>
> n=sizeof(arr)-1;
> do
> {
>
check this out..
#include
#include
using namespace std;
void print_sets(string *s,int pos,int n,char *to_print)
{
if(pos==n)
{
return;
}
for(int i=0;i>n;
string s[n];
for(int i=0;i>s[i];
}
char *to_print = new char[n];
print_sets(s,0,n,to_print);
}
--
check this out..
#include
#include
using namespace std;
void print_sets(string *s,int pos,int n,char *to_print)
{
if(pos==n)
{
return;
}
for(int i=0;i>n;
string s[n];
for(int i=0;i>s[i];
}
char *to_print = new char[n];
print_sets(s,0,n,to_print);
}
12 matches
Mail list logo