- Given a circular list of integers (when you reach the end of the list you come back to the beginning), what is the most efficient algorithm to find the smallest integer in the list?
For example: circular_list = [22, 52, 66, 82, 5, 8, 12, 19]
- Write a function that takes an integer and returns the smallest number that is greater than the given number which is apalendrome.
For example, if the input was 111 the next palindromic number would be 121.
- The least common multiple of a set of integers is the smallest positive integer that is a multiple of all of the integers in the set.
Write a function that takes an array of integers and efficiently calculates and returns the LCM.
-
Explain the difference between a symbol and a string.
-
What is the purpose of
yield
-
What is a Range?
-
What is the difference between ‘&&’, ‘and’ and ‘&’ operators?
-
What is a module?
-
How can you define a custom Exception?
-
What do controllers do in Rails?
-
What is RESTful routing?
-
What is the purpose of a layout?
-
What is Rake?
-
What is Capistrano?
-
How do you create a has many through relationship?
-
What is fields_for used for?
-
What is interpolation?
-
Reverse the string
"question"
in place. -
Explain the difference between class and instance variables
-
What is a mixin? What is the difference compared with classical inheritance?
-
Write a method that turns the string
"Hi my name is Bob"
into"iH ym eman si boB"
-
Explain "convention over configuration."
-
What is ORM?
-
What is a session?
-
What is a namespace?
-
What’s the difference between authorization and authentication?
-
Explain this ruby idiom:
y ||= z
-
What does
self
mean? -
Give me an example of recursion.
-
How do redirect and render differ?
-
Explain what ‘has_many’ is and what happens when it is run.
-
What’s the difference between PUT and POST?
-
Explain why in ruby nil.object_id is equal to 4.
-
How would I revert to a previous commit?
-
What are different types of joins in SQL?
-
What data structures are you familiar with?
-
Name every data type.
-
What’s a foreign key?
-
When do validations get called?
-
What is eager loading?
-
What’s a partial? What’s it for, how many can you have?
-
What is HTTP?
-
Explain the asset pipeline.
-
How does false differ from nil?
-
What is Git and why would you use it?
-
What is a migration?
-
Explain the Rails request cycle.
-
Given 1GB of memory, and a billion phone numbers; how do you sort them?
-
Say you had an app with users. How would you let them have followers?
-
What is the default Rails server? What are some others.
-
What is the difference between a lambda, a block and a proc?