Analzying the following code and answer the complexity of this algorithm public String getString() String s= ""; for(int i =0 ; i < LARGE_NUMBER ; i++) { s += "a"; } return s; }
Software Enginner Interview Questions
420,122 software enginner interview questions shared by candidates
Write a function that implements division without dividing or multiplying.
Calculate the angle between a minute and hour hands in a clock.
You are in charge of a classroom which has n seats in a single row, numbered 0 through n-1. During the day students enter and leave the classroom for the exam. In order to minimize the cheating, your task is to efficiently seat all incoming students. You're given 2 types of queries: add_student(student_id) -> seat index, and remove_student(student_id) -> void. The rules for seating the student is the following: 1) The seat must be unoccupied 2) The closest student must be as far away as possible 3) Ties can be resolved by choosing the lowest-numbered seat.
Write codes for the Nth Fibonacci number.
From an arbitrary list of integers, find all pairs that equal zero.
Given a nested list of integers, return the sum of all integers in the list weighted by their depth For example, given the list {{1,1},2,{1,1}} the function should return 10 (four 1's at depth 2, one 2 at depth 1)
All questions are already on glass door. Just make a list of all the questions and answer them.
Given an array of integers, write a function that will produce a random permutation of the input array.
Given a large document and a short pattern consisting of a few words (eg. W1 W2 W3), find the shortest string that has all the words in any order (for eg. W2 foo bar dog W1 cat W3 -- is a valid pattern)
Viewing 1351 - 1360 interview questions