Interview questions

Algorithm interview questions – page 24

811 questions. Tap “Show answer” to check yourself.

  1. Explain Belady's Anomaly.

  2. How to find median of a BST?

  3. 01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.902 rec2. 05 x pic 999v99 05 y pic 99v99 05 z pic x(3) value 'abc'if rec1 is moved to rec2 then what is the value of rec2?

  4. What is hashing

  5. How to open Excel sheet & write in it & save it?

  6. How can we open an Excel sheet through the script

  7. How to Pass Multiple values in functions by using vb script? Function value(arg1,arg2)N1=arg1+arg2N2=arg1-agr2N3=arg1*agr2N4=arg1/arg2Value= How to pass ? End Function

  8. Write an algorithm to find an palindrome

  9. Define function ? Explain arguments in functions ?

  10. Difference: 'uses', 'extends', 'includes'

  11. ? The factor that affects the complexity of an algorithm is a. The maximum amount of memory needed by the algorithm b. The minimum amount of memory needed by the algorithm c. The avg amount of memory needed by the algorithm d. The maximum amount of disc space needed by the algorithm?

  12. What is the complexity of binary search algo?

  13. RDBMS triggers are typically bound to a _____________and one or more _____________

  14. Convert the decimal number 345.676 to base 6. a) 333.402 b) 333.204 c) 333.403 d) 1333.402 e) 1333.204

  15. What is a delegate? 1. A strongly typed function pointer. 2. A light weight thread or process that can call a single method. 3. A reference to an object in a different process. 4. An inter-process message channel

  16. Convert the number 486 to Gray code. a) 110100101 b) 100101011 c) 100010101 d) 111000101 e) 100000100

  17. Banker's algorithm for resource allocation deals with

  18. U have barcode, barcode number,item price, taxes, discounts for items (some criteria were given and u have to design an algo for calculating discount) and then finally compute Net price...what DS u ll use...

  19. What is a dangling pointer ?

  20. Lets say that I have a continuous bit pattern of 1's and there is a 1 ms glitch of 0's. How do I capture the glitch and display a stationary image of it? (assuming that 1 ms is too fast for out eyes to appreciably notice the change)

  21. You are given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set all bits between i and j in N equal to M (e.g., M becomes a substring of N located at i and starting at j). EXAMPLE: Input: N = 1000000000...

  22. Int a=20;int *p=&a; then what is the difference between ++*p & *p++?

  23. How many bit combinations are there in a byte?

  24. Given two indices in a byte m and n such that m>=n extract all the bits between m and n in a single instruction.

  25. The following is the page request stream generated in a virtual memory system employing LRU algorithm: 1 7 1 3 4 6 3 8 2 1; If the main memory can hold 4 page frames, determine the number of page faults.

  26. Given a byte array, in which characters can be 1 byte or 2 bytes long

  27. Synchronization involving Mutexes, Atomic operation, Race condition

  28. How to find next power of 2 for a given number. Eg next power of 5 is 8, next power of 30 is 32.

  29. OS - Scheduling, readers/writers, locking/atomicity protocols

  30. If in a tree, a node has more than 2 children, is it possible to do an Inorder traversal on it ? If yes, please explain how ?

Companies that ask Algorithm questions