Hi…All..
Check out the latest of the questions …
————————————————————–
C test:
Q1) linked list using recursion.
Q2) Find if a number is divisible my 3, without using %,/ or *. You can use atoi().
Q3) 2 integers A and B are given, find the no of bits that need to be flipped in A to get B. ( xor a and b and count the number of bits)
Q4) Write a Rotate function for rotating elements in an array, using a reverse function.
Q5) Given 2 sorted arrays A and B with duplicate elements, get C= A -B and does not have duplicates(use a variation of merging 2 arrays and then remove the duplicates.)
Q6) Some routines to swap int pointers.
Q7) Subtraction of 2 base 13 numbers.
Q8) Min and max nodes of a quad tree.
Q9) Prove that in a tree no of internal nodes is one less than leaves.
Q10) A couple of boolean logic proofs
Q11) Code to see if a binary tree is a BST or not.
Q12) Switch case program out put
Engineering test:
Most of it had algorithms( no code)
Q1) Given an array with some repeating numbers. Like 12,6,5,12,6
output: 12,12,6,6,5
12 shud come before 6 since it is earlier in list. So cant use a dictionary.
Q2) Implement a dictionary manually with a lil overhead.
Q3)finding nth element from end in a list
Q4)inserting an element into a sorted linked list.
In the anal part many questions were based on the rule that square root of 25 is +5/-5. Not just 5. Similarly for 1.
Q1) linked list using recursion.
Q2) Find if a number is divisible my 3, without using %,/ or *. You can use atoi().
Q3) 2 integers A and B are given, find the no of bits that need to be flipped in A to get B. ( xor a and b and count the number of bits)
Q4) Write a Rotate function for rotating elements in an array, using a reverse function.
Q5) Given 2 sorted arrays A and B with duplicate elements, get C= A -B and does not have duplicates(use a variation of merging 2 arrays and then remove the duplicates.)
Q6) Some routines to swap int pointers.
Q7) Subtraction of 2 base 13 numbers.
Q8) Min and max nodes of a quad tree.
Q9) Prove that in a tree no of internal nodes is one less than leaves.
Q10) A couple of boolean logic proofs
Q11) Code to see if a binary tree is a BST or not.
Q12) Switch case program out put
The engineering paper was totally based on the Data Structure, simple assembly programs implementation and some simple algorithms related to data structures.
So read Arrays, Linked list, postfix prefixes inorder post order etc.
Most of the problems in adobe are solved here, though it is not mentioned that they are from Adobe, so this means he has to go through them as many as possible A few of the question that were asked to me are A BST was given, find the fourth largest node You have N computers and [Ca, Cb] means a is connected to b and this connectivity is symmetric and transitive. then write a program which checks that all computers are interconnected and talk two each other Soln : – Breadth First Search(I guess) Some code in assembly was given and given five options. What is being calculated? Ans (XY) 2 + Y + Z Some commands in the assembly language were given. Then need to convert this code in assembly Commands were like Add- Adds top 2 elemnrts from stack and pushes the result back in to it Sub and others The code is A=300; For (i=0 ; i<=10 ; i++) A=A+200; Algorithm to draw a line in a 2-D axes. My Soln: find the slope m and intercept c, using standard formulae write an algorithm, to find if two binary trees are same |
write an O(log2(N)) algorithm to find X^N
- find the nth node from end in a linked list in single parse
2. wap to check if the tree is BST
3. prove A+BC =(A+B)(A+C)
4. (A023AC5B)-(129B5321) to the base 13
5. prove that no of leaf nodes in any binaryy tree is one more than the no of nodes with degree 2
6. write a prog in assembly lang 2 calculate sum of first n natural nos
7. print values in an array with recurring didits
eg a[10]={3,2,5,4,3,4,6,12,4,12,6}
the prog shud print {3,3,5,4,4,6,6,12,12}
chk the sequence
8. write prefix and postfix notation
9. insert a node in a sorted linked list.
10. draw dfa for b* + b*a(ba)*
11. simplify a boolean expression
~a(a+b) -(b+a)(a+~b)
how will you find the number of leaf nodes in a tree
rotate an array using reverse fn….