Given an array a contains all digits 0-9 a = [1, 4, 2, 1] # which represents 1421 Add one to the number and return the array return a = [1, 4, 2, 2] # which represents 1422
Software Engineer At Interview Questions
665,112 software engineer at interview questions shared by candidates
Except experience related questions I was asked coding question and I was supposed to write the solution to the problem in any programming language in a simple web-based code editor. The question was: given and array of positive integers and another integer find whether there is a consecutive range in the array, so that the sum of integers in the range is equal to the given number. They put an emphasis on delivering working, efficient solution. In my opinion this kind of interview requires a thorough preparation.
Given a string, remove all chars from the string that are present in say another string called filter.
Given sorted arrays of length n and 2n with n elements each, merge first array into second array.
Write a function to determine if a bin tree is a valid BST. I wrote a fully working solution in 3-5 minutes. It was also the most optimal but maybe because she needed to kill time, she asked me to rewrite it in what she thought was optimal (her reasoning didn't make much sense). Then she asked me for time and space requirements of the solutions. I said O(n) for both which is correct but she insisted that the space requirement was O(logn) which is wrong.
Typical Android Layouts (What's the best way to lay element vertically etc.). Android Lifecycle. LinkedList vs Arrays.
Print a binary tree level by level
Given an integer, if the number is prime, return 1. Otherwise return its smallest divisor greater than 1. e.g. if n = 24, its divisors are [1, 2, 3, 4, 6, 8, 12, 24]. The smallest divisor greater than 1 is 2.
Q: You are given two arrays of size m and n. Find the common elements between those arrays. Say, arr1 = {2, 5, 3} and arr2 = {5, 1, 2}. The common elements between those arrays are as follow: ans = {2, 5}
You have 2 jars and 50 black beads and 50 white beads. How many would you put of each color in each jar so that if a bead was randomly selected from both jars, you had the greatest chance they would match? You have to put all of the beads in the jars.
Viewing 701 - 710 interview questions