Question
S1 is a series of 5 consecutive multiples of 3 and S2 is
a series of 4 consecutive multiples of 8. If the ratio of 3rd to 2nd terms in S1 is 6:5 and in S2 is 5:4, what is the sum of the first digits of S1 and S2?Solution
Let S1 be x, (x + 3), (x + 6), (x + 9) and (x + 12)
Let S2 be y, (y + 8), (y + 16) and (y + 24)
So, (x + 6)/(x + 3) = 6/5
x = 12
Also, (y + 16)/(y + 8) = 5/4
y = 24
So, required sum = 12 + 24 = 36
Complete a simple hash function for a string s that sums the ASCII values of its characters and then takes the modulo of a prime number M.
def si...
Complete the Java code to replace all occurrences of a specific word (case-insensitive) in a string.
public class RegexReplacer {
  pu...
Which algorithm is commonly used for Part-of-Speech tagging?
In the dynamic programming solution for Matrix Chain Multiplication, the outermost loop iterates over the len (chain length). What are the correct loop ...
Which unit holds data temporarily and loses it when power is off?
Fill in the correct option for 26 blank space.
Given the array [38, 27, 43, 3, 9, 82, 10], what would be the two sorted subarrays immediately *before the final merge step* in a Merge Sort algorithm?
Which are the popular frequency ranges used in India for Wi-Fi communication ?
Which of the following algorithm uses Darwinian based algorithm to find the best solutions to solve complicated problems with a greater number of variab...
In Python, if a method in a subclass has the same name as a method in its superclass, which method will be called when invoked on an object of the subcl...