dke.ade
BAN USER- 3of 5 votes
AnswersA professor wants to see if two students have cheated when writing a paper. Design a function : hasCheated(String s1,String s2, int N) that evaluates to true if two strings have a common substring of length N. Additional question after implementation. Assume you don't have the possibility of using String.contains() and String.substring(). How would you implement this?
- dke.ade in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer Intern Java - 2of 4 votes
AnswersIn Java: Write a function in language of your choice that takes in two strings, and returns true if they match. Constraints are as follows: String 1, the text to match to, will be alphabets and digits. String 2, the pattern, will be alphabets, digits, '.' and '*'. '.' means either alphabet or digit will be considered as a "match". "*" means the previous character is repeat 0 or more # of times. For example: Text: Facebook Pattern: F.cebo*k returns true.
- dke.ade in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer Intern Algorithm - 1of 1 vote
AnswersYou are given two version numbers of a software, like Version 10.3.4 and Version 10.3.41. Write a program in Java to find out which of the version numbers are the latest. If version 1 is latest output -1, if version number 2 is latest output +1 else output 0 if same version. Both the version numbers are taken as string.
- dke.ade in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Android - 2of 2 votes
AnswersFind the pair of numbers that sums to an integer k from an linked list.
- dke.ade in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Algorithm