If given a list (or array) of numbers 1 - 100 with a number missing. How would you find that number?
Engineer Interview Questions
1,135,594 engineer interview questions shared by candidates
Given a list of integers A and an integer k, return the number of unique pairs of integers in A that sum to k. For example, if A=[1 2 5 5 10 8 2] and k=10, the answer is 2, arrived as 5+5 or 2+8. There were 15 tests for this question, with at least the last two timing out, given that the implementation was not as efficient as possible.
/* * Suppose we have a sorted array in ascending order, with no duplicates: * * {1, 2, 3, 4, 5, 6, 7} * * Somehow an unknown amount of numbers at the beginning are shifted to the end, * creating an array that looks like: * 0 1 2 3 4 5 6 * {3, 4, 5, 6, 7, 1, 2} * * Let us call the new array a shifted cyclic array. * * Now, given a Shifted Cyclic Array int a[], and its length n (> 0), write a function * to find the smallest number in the array. */
In the phone interview, they just asked about my projects on the resume. and my programming experience. A week later, I got noticed that I need to take an online assessment. This assessment had 4 parts, first is 10 quick response questions, very easy, just be quick, you have 2 minutes limit; second is math questions, not hard, but need to be very careful; third is programming learning, they first teach you some basic rules about a new programming language and then test you each point they have shown you. I think this part is to test if you are a quick learner; the last part is 4 programming questions using the languages they have provided, for me, these questions are not very easy. It took a long time. Please prepare a calculator for the test. I forget to prepare one so it took longer to figure some questions. Please keep this in mind: being fast is important, but not as important as accuracy. You can find online assessment sample questions on the website to prepare for the assessment.
1. Exam: Using classses of name, address, which build a person class, buiuld those classses and build a graph, connecting the person nodes - using name and address(if they are the same they are related). Write a function to find the minimum level between two people. 2.Interview - background and then a question. Given a class, print out its attribute names and values. Aftwerwards questions about it, about infinitive loops, complexity, other data structures and how to use it as an api.
# n=3 * * * @ * @ * @ * * * #n=5 * * * @ * * * @ * * * @ * * * @ * * * @ * * * somewhat similar to these !
how to find the second smallest number out of iven n integers
Most of the technical questions focused on power supply design. For this position this is a one of the more difficult tasks so they want to know how switching regulators work and different trade offs involved.
Python 1 #1.returns the number of times a given character occurs in the given string s1='missisipi' #print(s1.find('s')) res=[] for i in range(len(s1)): #print(s1[i]) if s1[i]=='s': res.append('s') print(len(res)) #2.[1,None,1,2,None} --> [1,1,1,2,2] arr=[None,1,2,None] new_l=[] for i in range(0,len(arr)): if arr[i] != None: new_l.append(arr[i]) else: new_l.append(arr[i-1]) print(new_l) #2. (python) Given two sentences, construct an array that has the words that appear in one sentence and not the other. A = "Geeks for Geeks" B = "Learning from Geeks for Geeks" d={} for w in A.split(): if w in d: d[w]=d.get(w,0)+1 else: d[w]=1 for w in B.split(): if w in d: d[w]=d.get(w,0)+1 else: d[w]=1 unmatchedW=[w for w in d if d[w]==1] print (unmatchedW) 3. d = {"a": 4, "c": 3, "b": 12} [(k, v) for k, v in sorted(d.items(), key=lambda x: x[1], reverse=True)] #[('b', 12), ('a', 4), ('c', 3)] SQL # # sales # products # +------------------+---------+ +---------------------+---------+ # | product_id | INTEGER |>--------| product_id | INTEGER | # | store_id | INTEGER | +---<| product_class_id | INTEGER | # | customer_id | INTEGER | | | brand_name | VARCHAR | # +---<| promotion_id | INTEGER | | | product_name | VARCHAR | # | | store_sales | DECIMAL | | | is_low_fat_flg | TINYINT | # | | store_cost | DECIMAL | | | is_recyclable_flg |… Show More 1. find top 5 sales products having promotions Select Sum(s.store_sales), brand_name, count(p.product_id) from products p inner join sales s p.product_id = s.product_id where promotion_id is not null group by brand_name having count(p.product_id) =1 /* single-channel media type */ order by 1 desc limit 5 2. # -- % Of sales that had a valid promotion, the VP of marketing # -- wants to know what % of transactions occur on either # -- the very first day or the very last day of a promotion campaign. select sum(case when valid_promotion = 1 then 1 else 0 end)/count(*) * 100 as percentage from sales where day = First_day(date) or day = last_day(date) or select sum(case when transaction_date = (select min(transaction_date) from sales) then 1 else 0)/count(*) as first_day_sales, sum(case when transaction_date = (select max(transaction_date) from sales) then 1 else 0)/count(*) as last_day_sales from sales or select avg(transaction_date in (p.start_date,p.end_date))*100 as first_last_pct from sales s join promotions p using(promotion_id)
Write a method to generate the Fibonacci series
Viewing 1251 - 1260 interview questions