Implement a method 'find' that will find the starting index (zero based) where the second list occurs as a sub-list in the first list. It should return -1 if the sub-list cannot be found. Arguments are always given, not empty. Sample Input 1 list1 = (1, 2, 3) list2 = (2, 3) Sample Output 1 1 Explanation As second list (2, 3) is sub-list in first list (1, 2, 3) at index 1 Sample Input 2 list1 = (1, 2, 3) list2 = (3, 2) Sample Output 2 -1
Senior Developer Interview Questions
29,077 senior developer interview questions shared by candidates
technologies, not algorithms nor data structures
Q: How would you explain protocol-oriented programming ? Q: Can you explain MVVM? Q: Explain what SOLID is?
6. SQL Questions - Write up a School Registration DB Schema - Two table of Employee (ID, Name)/Salary History (EMP_ID, SALARY, SAL_BEGIN_DATE) - Find primary keys/foreign keys. - Find ID of employee whose salary decreased. - Find ID, total comp of employees - Find ID of employees who got only paid once.
Write shell script to search for a given string in all files in given directory.
Given an array of numbers, create another array of numbers. Calculate each new array number by multiplying all input array numbers, except for the current number position in the new array.
What is the output of below program. var a = [1,2,3,4] for (var i=0; i<a.length; i++){ setTimeout(function(){ console.log(i) },1000) } ( My Ans : it will print 4 5 times as it will store the latest reference) Next They asked me : How can i print 1,2,3,4 by changing some code in above example
check if a linked list is pallendrom.
what is add? why pdd helpful for us?
1.Code challenge.
Viewing 31 - 40 interview questions