How would you reverse the image on an n by n matrix where each pixel is represented by a bit?
Programmer Trainee Interview Questions
712,403 programmer trainee interview questions shared by candidates
What sort would you use if you required tight max time bounds and wanted highly regular performance.
Guessing game - I pick a number between 1 and 100 and you are trying to guess it. Every time you query a number I tell you if it is higher or lower. Part 1- Write the code of it, if cost of querying a number is equal. Part 2- How about if cost of querying number x is x? How would you change the algorithm?
Implement hash table. Given a mountain of integers :: like 1 2 3 9 6 5 or 4 9 3 give the maximum
Given a string, find the longest substring which contains 2 unique characters. ""abcbbbbcccbdddadacb" => "bcbbbbcccb"
Given an array of character you must delete all the characters that got repeated 3 or more times consecutively and add '0' in the end of the array for every deleted character Example: "aabbbbcdddee" -> "aacee0000000" "22221" ->"00001 " The problem must be solved in: O(1) memory O(n) time And you can't overwrite a cell in the array more than once.
Why Bloomberg? Tell me about yourself and what you do? Given 11000111, output how far each 0 is from the current index. So output should be 21000123
Write a program to reverse the numbers (e.g 12345 to 54321), without using vectors.
1) If Child class has parameterized constructor and parent class has default constructor . will it work
You’re given a board game which is a row of squares, each labeled with an integer. This can be represented by a list, e.g. [1, 3, 2, 0, 5, 2, 8, 4, 1] Given a start position on the board, you “win” by landing on a zero, where you move by jumping from square to square either left or right the number of spaces specified on the square you’re currently on. Your task is to implement the function: def can_win(board, pos): returns True if you can win the board from that starting pos, False otherwise
Viewing 611 - 620 interview questions