Hi,
Can anyone give me links to documents/sites where I can get info on
algorithms used in Digital video, and Over The Traffic video algos ?
thanks in advance,
Karthik
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group,
On May 3, 9:43 am, Jitendra Kushwaha wrote:
> @divya
>
> I try to simulate what you said for the given array
>
> index : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
> array1 : 8, 7, 4 ,3 , 2, 1, 1, 1, 1, 1
> ^ ^
> p11 p12
>
> *p11 = 8 and
copy the array(A) in a different array(B) to store the index info.(space
O(n))
sort(A)
take each pair's sum ( complexity O(n^2) ) and with that do a binary search
for the 3rd element needed.(O(log(n))).
Check for the indices in B.
i believe it can be done in better time somehow.
On Mon, May 3,
Hi Amit,
This particular example was quite simple.. just required using calculator
couple of times.
We know log 1 =0 and log 10 = 1, so given the above equation, it was clear
that the answer had to lie within the range (1,10) and then I used the
calculator couple of times to narrow down the range.
@Rajesh gave a simple elegant solution.
A look at a Linux calculator : you can even calculate 99! =
8.854887824e+5584950 in few seconds. I just looked at the code(its open
source right!), which is not so easy to understand in few minutes.
Here is the some part of code I extracted from sou
@Jitendra
I dont think so.Try these 2 examples to check:
A[1..n] :20 10 0
B[1..n] :18 13 5
Ans :38 33 28
A[1..n] :20 10 0
B[1..n] :18 17 16
Ans :38 37 36
My conjecture is: In the worst case, instead of combination of 1st
element of first array with all elements of second arra
ya string one even will be more suitable way..
On Mon, May 3, 2010 at 5:33 PM, Rohit Saraf wrote:
> are forget abt representation. It can be stored as string anyways.
> Tail recursion is awesome at times !
> --
> Rohit Saraf
> Second Year Undergradu
slight change in value of c
c = 34 + 2 = 36 //arr1[4] + arr2[0] greatest !!!
my mistake..
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group,
@divya
I try to simulate what you said for the given array
index : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
array1:8, 7, 4 ,3 , 2, 1, 1, 1, 1, 1
^ ^
p11 p12
*p11 = 8 and *p12 = 3
index : 0, 1, 2, 3, 4, 5, 6, 7, 8
given an array(unsorted) may contain negative numbers too
find the index of three numbers whose sum is closest to zero in O(N2 log
N) time and O(N) space.
P.S -3 is more close to zero then -6 (number line ...)
--
With Regards,
Jalaj Jaiswal
+919026283397
B.TECH IT
IIIT ALLAHABAD
--
You receiv
@Jitendra
but that's no fun [?]
-
Anil
On Mon, May 3, 2010 at 5:12 PM, vignesh radhakrishnan <
rvignesh1...@gmail.com> wrote:
> @siddharth and prasoon either design a very long integer library yourself,
> or use gmp library in cpp or BigInteger Class in java.
>
> Regards,
> vignesh
>
> On 3
yeah, you are right. It comes from 2 to 6. But is there any way to solve it
on paper?
-Regards
Amit Agarwal
Contact: 09765348182
www.amitagrwal.com
On Mon, May 3, 2010 at 3:02 PM, Sundeep Singh wrote:
> oops
>
> On Sat, May 1, 2010 at 5:50 PM, Sundeep Singh wrote:
>
>> Hi Amit,
>>
>> here'
you have to store the result some where for that you don't have
inbuilt datatype like python those will take care of your overflow
On Mon, May 3, 2010 at 9:46 AM, siddharth srivastava
wrote:
> But is there any way to accomplish this without an array ? Even for 100!.
>
> On 2 May 2010 06:15, Praso
@satish
ur solution is of o(nlogn) complexty
@ jitendra
suppose p11 and p21 r pointing at index 0 and p12 at 4 and p22 at 1. now
suppose at ths point d s greater than b and c. now u increment p11 and p21.
but it can be a case that a[0] + b[2] is next greatest value bt t wont
work for ur algo.
@siddharth and prasoon either design a very long integer library yourself,
or use gmp library in cpp or BigInteger Class in java.
Regards,
vignesh
On 3 May 2010 09:46, siddharth srivastava wrote:
> But is there any way to accomplish this without an array ? Even for 100!.
>
>
> On 2 May 2010 06:
nice algo by rajesh.
bt i think using linked list will be better..
On 3 May 2010 09:46, siddharth srivastava wrote:
> But is there any way to accomplish this without an array ? Even for 100!.
>
>
> On 2 May 2010 06:15, Prasoon Mishra wrote:
>
>> I think challenge here is not the Execution time,
The Question only ask to print first n number and each array array is of
size n
So in the worst case we will take combination of 1st element of first array
with all the element of second array.
my above code runs in O(n) taking this considerations... any comments or
test case where it fails??
for simplicity in writin algo i've taken sorted array instead of list
struct node * create( int *sorted,number of elements){
struct node *temp,*left,*right;
int tempii[100],tempiii[100];
if(number of elemnts ==0)
return NULL;
temp->data=sorted[
You can do it easily in python...:)
Here is the python code
n=400
def fact(num):
ans = 1
while(num):
ans = ans*num
num = num-1
return ans
print fact(n) #printing 400!
even 1000! can be calculated
Regards
Jitendra Kushwaha
Undergradute Student
Computer Science & En
1) Make the middle element the root.
Recursively make the left and right subtrees from the left and right
halves of the link list.
2) Implement balanced insertion in trees (via rotations on every step...).
Now insert each element
--
Rohit Saraf
are forget abt representation. It can be stored as string anyways.
Tail recursion is awesome at times !
--
Rohit Saraf
Second Year Undergraduate,
Dept. of Computer Science and Engineering
IIT Bombay
http://www.cse.iitb.ac.in/~rohitfeb14
On Mon, May
Guys no one commented on my solution? Any takes on it?
Anyways, below is my solution (in pseudo code)
Pre-condition: A and B are sequences of equal length and sorted in
descending order
Input: Sequences A[1..N] and B[1..N] of equal lengths(N)
Ouput: Sequence C[1..N] containing sorted sum of orde
But is there any way to accomplish this without an array ? Even for 100!.
On 2 May 2010 06:15, Prasoon Mishra wrote:
> I think challenge here is not the Execution time, but the storage. 300 ! or
> 400! should generally go beyond the storage capabilities of long long ints
> in cpp.
> @ Rohit Sara
I think its a good question and fairly complicated to explain at
hardware(RTL) level. Anyways, let me give it a try :
You suggested that only 1 instruction is executed by one processor,
which is not true(if you have read computer architecture). Briefly,
lets assume the instruction pipeline(assumin
oops
On Sat, May 1, 2010 at 5:50 PM, Sundeep Singh wrote:
> Hi Amit,
>
> here's the answer: (I am assuming in your equation "lg" implies log to the
> base 10)
> n < 8 log(n)
> => n/8 < log(n)
> => 10 ^(n/8) < n
>
The final deduction was incorrect!!
for log base 10, the answer is:
2 <= n <=
25 matches
Mail list logo