Staff Engineer Interview Questions
- 0of 0 votes
AnswersCheapest Call Girls in Patel Nagar Delhi 9599646485 Shot 1500 Night 6000 Booking Now Day/Night Doorstep Open 24/7 Hrs.
- billa9599646485 October 29, 2021 in India for fim| Report Duplicate | Flag | PURGE
Saket Call Girls 959966485 Staff Engineer - 0of 0 votes
AnswersPrint the most near missing integer in the unsorted value.
- Manoj July 16, 2021 in Indiapublic static void main(String args[]) { System.out.println(solution(new int[]{-4,-2})); } private static int solution(int[] ints) { //1,2,3,4 //2,3,4 = 1 //-2,-1,2,3,4 = 0,0,2,3,4 = 1 //-4,-3,-2 = 1 //-4,-2 = 1 //-3,-2,-1 , 1 = 2 Arrays.sort(ints); //O(log*n) for (int i = 0; i < ints.length; i++) { if (ints[i] > 0) { if (ints[i + 1] - ints[i] > 1) { return 1; } break; } ints[i] = 0; } //O(n-m) n- lenght array , m - negative interger //1,2,3,5,7,8,9,10 for (int i = 0; i < ints.length - 1; i++) { if (ints[i + 1] - ints[i] > 1) { return ints[i] + 1; } } //O(n-k) return ints[ints.length - 1] + 1; //O(log n * n2) }
| Report Duplicate | Flag | PURGE
Walmart Labs Staff Engineer Data Structures - 0of 0 votes
AnswersFind 'k' largest element in stream of integers.
- neer.1304 July 01, 2019 in United States
Constraints -
1) k can vary for every query
2) Stream can not be stored| Report Duplicate | Flag | PURGE
Visa Staff Engineer design - 0of 0 votes
AnswersGiven an array of negative and positive integers, find the biggest sum of a sub-array.
- asiftasleem September 12, 2018 in United States| Report Duplicate | Flag | PURGE
Service Now Staff Engineer Algorithm - 0of 0 votes
AnswersGiven an array of integers and a target. Find the two array elements if they are summed up, will result in the target.
- asiftasleem September 12, 2018 in United States| Report Duplicate | Flag | PURGE
Service Now Staff Engineer Algorithm - 0of 0 votes
AnswerWe have an array if 0's and 1's like
- johnsvakel April 16, 2018 in India for NA
00010000010001001
Assume that all 1's are a person and if a new person comes and if we want to add to the array in such a way that the gap between individuals are maximum as possible.
if we add a new person, then the new array should be
000100100010001001| Report Duplicate | Flag | PURGE
Microsoft Staff Engineer Data Structures - 0of 0 votes
AnswersDesign bookshelf class model to perform checkout of book operation
- kay March 16, 2018 in United States| Report Duplicate | Flag | PURGE
Apple Staff Engineer - 0of 0 votes
AnswersTell me how to test whether the high-order bit is set in a byte?
- kay March 16, 2018 in United States| Report Duplicate | Flag | PURGE
Apple Staff Engineer - 0of 0 votes
AnswerWhen would you use a linked list vs. arraylist?
- kay March 16, 2018 in United States| Report Duplicate | Flag | PURGE
Apple Staff Engineer - 0of 0 votes
AnswersSuppose under this directory /web there are 50,000 - html files
- kay March 16, 2018 in United States
List all the files which has phone numbers with below pattern
(xxx)-xxx-xxxx
xxx-xxx-xxxx| Report Duplicate | Flag | PURGE
Apple Staff Engineer - 1of 1 vote
AnswersPrint out the grade-school multiplication table up to 12x12
multiplication output:1 2 3 4 5 6 7 8 9 10 11 12 2 4 6 8 10 12 14 16 18 20 22 24 3 6 9 12 15 18 21 24 27 30 33 36 4 8 12 16 20 24 28 32 36 40 44 48 5 10 15 20 25 30 35 40 45 50 55 60 6 12 18 24 30 36 42 48 54 60 66 72 7 14 21 28 35 42 49 56 63 70 77 84 8 16 24 32 40 48 56 64 72 80 88 96 9 18 27 36 45 54 63 72 81 90 99 108 10 20 30 40 50 60 70 80 90 100 110 120 11 22 33 44 55 66 77 88 99 110 121 132 12 24 36 48 60 72 84 96 108 120 132 144
*/
- kay March 16, 2018 in United States| Report Duplicate | Flag | PURGE
Apple Staff Engineer - 0of 0 votes
AnswersWrite a program to read a string with first_name, last_name, age and sort it based on any of the input column name
- kay March 16, 2018 in United States
sample string
john doe 33
smith black 9
diana yale 12
assume the string to be single giant string| Report Duplicate | Flag | PURGE
Apple Staff Engineer - 0of 0 votes
AnswersHow to design a system which allows millions of requests
- kay March 16, 2018 in United States| Report Duplicate | Flag | PURGE
Walmart Labs Staff Engineer - 0of 0 votes
AnswersDesign an app which allows different types of jobs to be triggered at user specified delay
- kay March 16, 2018 in United States| Report Duplicate | Flag | PURGE
Walmart Labs Staff Engineer - 0of 0 votes
Answers
- getPDat February 14, 2018 in United StatesWe encode a string, s, by performing the following sequence of actions: Replace each character with its ASCII value representation. Reverse the string. For example, the table below shows the conversion from the string "Go VMWare" to the ASCII string "711113286778797114101": // Character G o V M W a r e // ASCII Value 71 111 32 86 77 87 97 114 101 // // We then reverse the ASCII string to get the encoded string 101411797877682311117. // // For reference, the characters in s are ASCII characters within the range 10 - 126 which include special characters. // // Complete the decode function in the editor below. It has one parameter: // encoded - A reversed ASCII string denoting an encoded string s. // // The function must decode the encoded string and return the list of ways in which s can be decoded. static Collection<String> decode(String encoded) { }
| Report Duplicate | Flag | PURGE
VMWare Inc Staff Engineer Algorithm - 1of 1 vote
AnswersGiven two strings containing only numbers, return product of the two strings. Strings are large so conversion to interger is not possible.
- DO November 04, 2017 in United States for High Availability| Report Duplicate | Flag | PURGE
VMWare Inc Staff Engineer Algorithm - 0of 0 votes
AnswerSay there are 100K users. Each user object has certain details like city, credit score, gender ..etc
- Seeker June 01, 2017 in United States
Say there are 100 Campaigns, Each campaign has an entry criteria, meta data consists of email body / template and a rank.
Goal is to send an campaign email for each user per one day which matches the entry criteria. The email should have highest rank suitable for this user.
Ex entry criteria :- Gender should be Female, Credit score is 700-720 and San Francisco city. Typically the criteria can be combination of several things and involves different operators.
How would you design the system to find best campaign for each user and sends email?| Report Duplicate | Flag | PURGE
CreditKarma Staff Engineer System Design - 1of 1 vote
Answersinput = 8
output =
1 1 1 1 1 1 1 2
3 2 2 2 2 2 2 2
3 3 3 3 3 3 3 4
5 4 4 4 4 4 4 4
5 5 5 5 5 5 5 6
7 6 6 6 6 6 6 6
7 7 7 7 7 7 7 8
- vshah9031 January 25, 2017 in Indiaimport java.util.*; class Test { int n; Scanner sc; void readNumber() { sc=new Scanner(System.in); n = sc.nextInt(); } void printPattern() { // write your logic here } public static void main(String[] args) { Test t = new Test(); t.readNumber(); t.printPattern(); } }
| Report Duplicate | Flag | PURGE
Staff Engineer Java - 0of 0 votes
Answershttps://www.hackerrank.com/challenges/array-and-simple-queries
- gopal.panda December 03, 2016 in United States
Given two numbers N and M. N indicates the number of elements in the array A[](1- indexed) and M indicates number of queries. You need to perform two types of queries on the array A[] .
You are given M queries. Queries can be of two types, type 1 and type 2.
Type 1 queries are represented as 1 i j : Modify the given array by removing elements from to and adding them to the front.
Type 2 queries are represented as 2 i j : Modify the given array by removing elements from to and adding them to the back.
Your task is to simply print | A[1] - A[N] | of the resulting array after the execution of M queries followed by the resulting array.
Note While adding at back or front the order of elements is preserved.| Report Duplicate | Flag | PURGE
Visa Staff Engineer Algorithm