Interview questions

Software Developer/ Programmer interview questions – page 4

2,071 questions. Tap “Show answer” to check yourself.

  1. Given a matrix (2D array) of m x n elements (m rows, n columns), write a function that prints the elements in the array in a spiral manner. Sample input matrix: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22...

  2. How will you load dynamic assembly? How will create Assemblies at run time? 2)How to maintain View State of dynamically created user controls? For example, If I am creating few instances ?

  3. You have a note to write by cutting and pasting necessary letters from the book, write an algorithm to see if you can write the note.

  4. Convert a number given in base B1 to a number in base B2 without using any intermediate base

  5. If the letters of the word "rachit" are arranged in all possible ways and these words are written out as in a dictionary, what is the rank of the word "rachit".

  6. When multiple users are working on one application, the SQL/Oracle statement gets locked when one user is working, thus another user cannot work simultaneously. How can multiple users work. Thus give me syntax for freeing SQL/Oracle queries in order for w

  7. Given 2 billion numbers and 2 MB RAM, how will you sort the numbers.

  8. Find out the smallest segment in a document containing all the given words. Desired Complexity is O nlogK ..n is the total no of words in the document and k is the number of input words

  9. Given an array containing red, green , blue coloured objects. design an algo to cluster these objects togetheri.e, one cluster for red, one for blue, one for green!!! Also design test cases to validate the algo!!!

  10. Design an algorithm that, given a list of n elements in an array, finds all the elements that appear more than n/3 times in the list. The algorithm should run in linear time ( n >=0 )

  11. A matrix(m*n) full of chars, find all possible words in it. You can go in any direction, left right top bottom, Find out all English valid words, same index should not occur twice in same word

  12. Write a function print(int n) which prints the values of n, 2n, 4n, 8n ... till the value doesn't exceed 40000. After reaching 40000, it it should print 8x, 4n, 2n, n. No local variables, no loop and no GOTO

  13. Implement the unix command WordCount (wc) using lenguage of your choice. The method takes a string and returns the number of words in the string, number of chars and the number of lines.

  14. Given an array & target value. Find a,b,c such that a+b+c=target focus time & space

  15. Given a dictionary find out if given word can be made by two words in dictionary. For eg. given "newspaper" you have to find if it can be made by two words. (news and paper in this case)

  16. Write node structure of B & B+Tree Tree asked about application & clean code for structure for both Tree

  17. You are given some 1000000 numbers in the range of 1 to 1000000000 not in any sorted order.The given numbers are random. You need to eliminate the duplicates in the given set of numbers. Consider for optimized solution

  18. Given a number, convert it to minimal sum of squares.

  19. Given an array of positive and negative numbers, find 3 numbers whose sum is 0. The array contains atleast 3 numbers.

  20. Discuss traveling salesman problem

  21. Write a diff function (highlight the 'diff' between two strings)

  22. We have a webite with 5 Webpages {A,B,C,D,E}. Whenever a user accesses the website, the application logs an entry in the access_log file. For example: user user1@amazon.com accesses Page A at Time T0, Page B at Time T10 and Page C at time T1...

  23. Excel labels its rows with letters. For example row 0 is labeled 'A', row 1 is labeled 'B', row 26 is labeled 'AA', and so on.

  24. Given a stream of N integers which has the property that no integer is more than 1000 positions away from its sorted location, how would you output the integers in sorted order while using constant storage?

  25. Suppose there is a circle. You have five points on that circle. Each point corresponds to a petrol pump. You are given two sets of data.

  26. Implement auto calling functionality of the mobile phone(T9)

  27. Given a number is in the form of array, 34899 is given as [3, 4, 8, 9, 9] add 1 to this number and return.

  28. Describe the what is Crawler & why it is needed is dare any alternative of this exist.Explain its basic functionality using algorithm,Now Which Data-structure you will use to design web crawler for Google Mass Scalable Architecture..when shoul...

  29. Given a set of coin denominators, write a function to nd the minimum number of coins to give a certain amount of change.

  30. Consider the following procedure: f(n) for i=1 to n dp j=n while j>i do j=j-1 end while end for Assume the above procedure are only an integer n>0; What is the time complexity...

Companies that ask Software Developer/ Programmer questions