soni vashisht
BAN USER- 0of 0 votes
AnswersGiven two lists sorted in increasing order, create and return a new list representing the intersection of the two lists. The new list should be made with its own memory — the original lists should not be changed.
- soni vashisht in United States
For example, let the first linked list be 1->2->3->4->6 and second linked list be 2->4->6->8, then your function should create and return a third list as 2->4->6.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersGiven two numbers represented by two lists, write a function that returns sum list. The sum list is list representation of addition of two input numbers ?
- soni vashisht in United States
Example First List: 5->6->3 // represents number 365
Second List: 8->4->2 // represents number 248
Resultant list: 3->1->6 //
Note :Any Carry forward should also be added as the new node . Any Comments on the code below| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersMerge Two Arrays A & B where A has enough capacity to hold elements of array B. Also give the number of elements of A & B array. Follow Up- Test this code.
- soni vashisht in United States
I need to test if the array is having -ve numbers also. Here is my code :| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 0of 0 votes
Answers/*Find MagickNumber With Duplicate Numbers in Sorted Array 2. Consider a sorted array with all unique numbers. Where a magick number[i] =i */
- soni vashisht in United States
/* -10,-5,2,2,2,2,4,7,9,12,13
* */
Why the MAGICK Index be on the left side ?| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersNeed to Print all the elements of the ArrayList consisting an ArrayList using C# ?
- soni vashisht in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C# - 0of 0 votes
AnswersPrint all the elements of the ArrayList consisting an ArrayList using C# ?
- soni vashisht in United States| Report Duplicate | Flag | PURGE
- 0 Answers testing problems
asked string reversal..testing problems..etc
- soni vashisht October 16, 2012| Flag | PURGE
Node addTwoLists(ref Node head1, ref Node head2)
{
Node head3 =null;
Node currOfHead1 = head1;
Node currOfHead2 = head2;
int sum = currOfHead1.data + currOfHead2.data;
int carry = Math.Abs(sum / 10);
if(head1 == null || head2 == null)
return null;
while (currOfHead1!=null && currOfHead2!=null)
{
AppendToHead(ref head3, (sum % 10) + carry);
currOfHead1 = currOfHead1.next;
currOfHead2 = currOfHead2.next;
}
if (currOfHead1 == null)
{
sum = currOfHead2.data;
AppendToHead(ref head3, (sum % 10)+carry);
}
else
if (currOfHead2 == null)
{
sum = currOfHead1.data;
AppendToHead(ref head3, (sum % 10) + carry);
}
return head3;
}
Can you provide more details...Design a Button ??
- soni vashisht September 20, 2012I do understand moving to left side, but I am not able to understand why we don't go on left side..what if we find a magic number at index 2 and value 2
- soni vashisht September 18, 2012Something like : int []a = new int [7]{1,3,5,7 ,0 , 0,0};
int[] b = new int[3] { -3, 4, 6 };
public static int[] merge(int[] a, int[] b, int n, int m)
{
int i = n - 1;
int j = m - 1;
int k = n+m - 1;
while (i>= 0 && j >= 0)
{
if (a[i] >= b[j])
{
a[k] = a[i];
i--;
k--;
}
else
{
a[k] = b[j];
k--;
j--;
}
}
return a;
}
Repnoradweisser, Backend Developer at ASU
I am Nora, I am a writer, I write many types blogs and articles. I collected many types and astrology ...
Reprickyjwerner, Area Sales Manager at Accolite software
I am Ricky, I live in Houston USA, I am working as a distribution manager in Total Serve company. I ...
Repsamuelcsmith700, Accountant at Absolute Softech Ltd
Je suis chef d'équipe de support Office dans une entreprise Action Auto. Je suis également rédacteur de blog. J ...
Repcharlespladd, Android Engineer at Abs india pvt. ltd.
I am Charles from Pascoag USA. I have strong knowledge of pain management systems. And I have experience in providing ...
- soni vashisht September 30, 2012