You have a function f(p) that returns an array of linked pages e.g f(homepage) = {page1, page2, page3}. Or f(page1) = {page4, page5}. If there is no linked pages function will return null. And we say one site is a good site if we can get to any page of that site in a less than 6 clicks. The task was to write a function that will check is it a good site or not using f(p).
Engineer Software Interview Questions
511,738 engineer software interview questions shared by candidates
In a BST write a program to find 2 nodes x and y such that X+y=k
Find the character with longest repitition in the string e.g. aaacccddddeefffffffg the result should be 'f'.
find duplicated item from an array, output the duplicated item with their times
The numbers 1-5 are inserted, in order, into a stack. Numbers are removed from the stack one-by-one and pushed into another array (numbers could be removed at any time, even before all the numbers have been added to the stack). What order of numbers in the array could NOT be produced by this scenario? Write code to determine if a sequence of numbers could have been produced by this scenario.
Write a function to find the maximum sum of sub array where the array can have negative and positive numbers.
1. Given an array of n integers. Derive an array where the value of the element at index i is the product of elements in the given array except element i in the given array. The complexity should be O(n). 2. How to traverse timing graph starting from the input nodes? Data structure of the nodes in the graph is given. Write a C program for it. 3. Implement C++ hashing function.
given #define A 2 + 3 #define B 2 printf("%d", A * B) what does this print?
Given a list of transactions, How can we calculate the frequency counts of all possible item-sets? For example, Input: ID Purchased Items 1 apple, banana, lemon 2 banana, berry, lemon, orange 3 banana, berry, lemon Output: Itemset Frequency apple, banana 1 apple, lemon 1 banana, berry 2 banana, lemon 3 ... apple, banana, lemon 1 banana, berry, lemon 2 ... banana, berry, lemon, orange 1
1.1. given a list of words, group anagrams. 1.2. find all 3 items that sum to 0 in an array. 2.1. Write a function that calculates input strings with operators +,-,*,/ eg. "5+5*6" should output 35
Viewing 991 - 1000 interview questions