THE SUN RISE IN EAST Print the above sentence with out duplicating chars ?
Developer Interview Questions
269,153 developer interview questions shared by candidates
Tell us about your career so far?
Are you willing to sign a non compete agreement?
Core Java questions.
1. Lock and Unlock a node of the given tree, Structure of the tree: one root multiple childs (>2). problem: find solution for locking and unlocking the nodes logic with log(N) complexity. Lock(node): returns boolean we can lock the node if and only if ancestor nodes and descendant nodes are not locked. if they are locked then return false else return true Unlock(node): returns boolean if node is already locked then unlock it and return true else return false
Technical
Write an algo which will return all pairs of integers from a given list of integers that satisfy the following equations: x + y = z, where x,y,z are all present in the given list. Optimize it to run in constant time.
There was a two part question in Hackerrank with a medium difficulty level. The first part was a coding exercise and the second part was describing the complexities of the solution that was used.
The following function is stripping (removing) all the characters in string stripChars from the end of the string str? The function is incomplete. What code should be there in place of the comment? public static String stripEnd(final String str, final String stripChars) { if (str == null) return str; int end = str.length(); int INDEX_NOT_FOUND = -1; if(end == 0) return str; else if (stripChars.isEmpty()) { return str; } else { // ********************* // What's the code here? // ********************* } return str.substring(0, end); } while (end != 0 && str.indexOf(stripChars.charAt(end - 1)) == INDEX_NOT_FOUND) { end++; } while (end != 0 && str.indexOf(stripChars.charAt(end - 1)) != INDEX_NOT_FOUND) { end--; } while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) != INDEX_NOT_FOUND) { end--; } while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) == INDEX_NOT_FOUND) { end++; }
Why is iOS faster than Android
Viewing 931 - 940 interview questions