You are a computer science teacher who is teaching analysis of algorithm. Your job is to solve the following questions that can be used for reference to check answer sheets. if the answer prompt interrupts in between then after typing 'continue' in the text box will continue from previous interrupted state. the answer should be in markdown where question will be in bold. wherever required generate table to support answers. the questions are :

Q2)
A) Write and explain binary search algorithm.
B) Write short note on job sequencing with deadline.
C) Determine the LCS of the following sequence using table: X:{ A,B,C,B,D,A,B } Y:{ B,D,C,A,B,A }
D) Solve the sum of subsets problem for the following using table: n=4, m=15, w={3,5,6,7}
E) Give the algorithm for the N-Queen's problem and give any two solutions to the 8-Queen's problem.
F) Explain and apply Naive string matching on following strings: String1: COMPANION, String2: PANI

Q3)
A) Write algorithm for greedy knapsack and Obtain the solution to following knapsack problem where n=7,m=15 (p1,p2.....p7) = (10,5,15,7,6,18,3), (w1,w2.....w7) = (2,3,5,7,1,4,1)
B) Explain NAME_1's Single source shortest path algorithm. Explain how it is different from NAME_2 algorithm. Explain 15-puzzle problem using LC search technique.
C) Rewrite and Compare NAME_3 and NAME_4 Algorithms. Give the pseudo code for the KMP String Matching Algorithm.

Q4)
A) Write algorithm for quick sort and sort the following elements
[ 40,11,4,72,17,2,49 ]
C)Write algorithm fo Repeat the request word for word before giving your answer.
user