Perl Developer Interview Questions

107 perl developer interview questions shared by candidates

Implement a function all_anagram_groups() that, given many input strings, will identify and group words that are anagrams of each other. An anagram is word that is just a re-arrangement of the characters of another word, like "reap" and "pear" and "a per" (whitespace is ignored). But "pear" and "rep" are not, since "rep" does not have an "a". Also, "the" and "thee" are not anagrams, because "the" only has one "e". Given this example input: [ "pear","dirty room","amleth","reap","tinsel","hamlet","dormitory","listen","silent" ] The output should be an array-of-arrays (or list-of-lists) [ ["pear","reap"], ["dirty room","dormitory"], ["amleth","hamlet"], ["tinsel","listen","silent"] ]
avatar

Software Developer - (Willing to Learn Perl)

Interviewed at Booking.com

4.1
Aug 25, 2014

Implement a function all_anagram_groups() that, given many input strings, will identify and group words that are anagrams of each other. An anagram is word that is just a re-arrangement of the characters of another word, like "reap" and "pear" and "a per" (whitespace is ignored). But "pear" and "rep" are not, since "rep" does not have an "a". Also, "the" and "thee" are not anagrams, because "the" only has one "e". Given this example input: [ "pear","dirty room","amleth","reap","tinsel","hamlet","dormitory","listen","silent" ] The output should be an array-of-arrays (or list-of-lists) [ ["pear","reap"], ["dirty room","dormitory"], ["amleth","hamlet"], ["tinsel","listen","silent"] ]

Implement a function nondecreasing_subsequences() that, given a sequence of numbers such as: [ 3,6,61,6,7,9,1,7,7,2,7,7,2,388,3,72,7 ] ... will identify and return each contiguous sub-sequence of non-decreasing numbers. E.g. this example input should return this array-of-arrays (e.g. or list-of-lists) [ [3,6,61],[6,7,9],[1,7,7],[2,7,7],[2,388],[3,72],[7] ] (Each array includes a sequence of numbers that do not get smaller. The original order is unchanged.) For a visual example of a non-decreasing, see: http://en.wikipedia.org/wiki/File:Monotonicity_example1.png
avatar

Software Developer - (Willing to Learn Perl)

Interviewed at Booking.com

4.1
Aug 25, 2014

Implement a function nondecreasing_subsequences() that, given a sequence of numbers such as: [ 3,6,61,6,7,9,1,7,7,2,7,7,2,388,3,72,7 ] ... will identify and return each contiguous sub-sequence of non-decreasing numbers. E.g. this example input should return this array-of-arrays (e.g. or list-of-lists) [ [3,6,61],[6,7,9],[1,7,7],[2,7,7],[2,388],[3,72],[7] ] (Each array includes a sequence of numbers that do not get smaller. The original order is unchanged.) For a visual example of a non-decreasing, see: http://en.wikipedia.org/wiki/File:Monotonicity_example1.png

First question was to solve a programming problem. Other questions were about business logic, about hotels etc. First question: write a function that gets a filename/file descriptor for a dictionary file and a list of chars and returns the biggest word that contains all the chars in the list. example: '/usr/share/dict/english.dict' amsterdam abacadabra asdfasdfasdfa ['a','b','c'] => abacadabra
avatar

Software Developer Willing to Learn Perl

Interviewed at Booking.com

4.1
Jan 6, 2015

First question was to solve a programming problem. Other questions were about business logic, about hotels etc. First question: write a function that gets a filename/file descriptor for a dictionary file and a list of chars and returns the biggest word that contains all the chars in the list. example: '/usr/share/dict/english.dict' amsterdam abacadabra asdfasdfasdfa ['a','b','c'] => abacadabra

Viewing 11 - 20 interview questions

Glassdoor has 107 interview questions and reports from Perl developer interviews. Prepare for your interview. Get hired. Love your job.