**Question 1. What Are The Arguments Present In Pattern Matching Algorithms?Answer :These are the following arguments that** are present in pattern-matching

**Algorithms:**

1) Subject,

2) Pattern

3) Cursor

4) MATCH_STR

5) REPLACE_STR

6) REPLACE_FLAG

1) Subject,

2) Pattern

3) Cursor

4) MATCH_STR

5) REPLACE_STR

6) REPLACE_FLAG

**Question 2. Explain The Function Sub In Algorithmic Notation.**

Answer :

In the algorithmic notation rather than using special marker symbols, generally, people use the cursor position plus a substring length to isolate a substring. The name of the function is SUB.

SUB returns a value the substring** of SUBJECT that is specified by the parameters i and j and an assumed value of j.**

**Question 3. In Algorithmic Context How Would You Define Book Keeping Operations?****Answer :****Usually when a user wants to estimate time he isolates the specific function and brands it as active operation. The other operations in the algorithm, the assignments, the manipulations of the index and the accessing of a value in the vector, occur no more often than the addition of vector values. These operations are collectively called as book keeping operations.**

**Question 4. Define And Describe An Iterative Process With General Steps Of Flow Chart?****Answer :****There are four parts in the iterative process they are:****Initialization: -The decision parameter is used to determine when to exit from the loop.****Decision: -The decision parameter is used to determine whether to remain in the loop or not.****Computation: – The required computation is performed in this part.****Update: – The decision parameter is updated and a transfer to the next iteration results.**

**Question 5. State Recursion And Its Different Types?****Answer :****Recursion is the name given to the technique of defining a set or a process in terms of itself. There are essentially two types of recursion. The first type concerns recursively defined function and the second type of recursion is the recursive use of a procedure.**

**Question 6. Define And State The Importance Of Sub Algorithm In Computation And Its Relation Ship With Main Algorithm?****Answer :****A sub algorithm is an independent component of an algorithm and for this reason is defined separately from the main algorithm. The purpose of a sub algorithm is to perform some computation when required, under control of the main algorithm. This computation may be performed on zero or more parameters passed by the calling routine.**

**Question 7. Name Any Three Skills Which Are Very Important In Order To Work With Generating Functions.?****Answer :****The three most important skills which are used extensively while working with generating functions are:****1)Manipulate summation expressions and their indices.****2)Solve algebraic equations and manipulate algebraic expressions, including partial function decompositions.****3)Identify sequences with their generating functions.**

**Question 8. What Is The General Strategy For Markov Algorithm?****Answer :****The general strategy in a Markov Algorithm is to take as input a string x and, through a number of steps in the algorithm, transform x to an output string y. this transformation process is generally performed in computers for text editing or program compilation.**

**Question 9. Define String In An Algorithmic Notation And An Example To Support It?****Answer :****In the algorithmic notation, a string is expressed as any sequence of characters enclosed in single quote marks.**

**Question 10. How To Find Median Of A Bst?****Answer :**

**Find the no. of elements on the left side.**

**If it is n-1 the root is the median.**

**If it is more than n-1, then it has already been found in the left subtree.**

**Else it should be in the right subtree**

**Question 11. What Is Diffie-hellman?****Answer :****It is a method by which a key can be securely shared by two users without any actual exchange.**

**Question 12. What Is The Goal Of The Shortest Distance Algorithm?****Answer :****The goal is completely fill the distance array so that for each vertex v, the value of distance[v] is the weight of the shortest path from start to v.**

**Question 13. Explain The Depth Of Recursion?****Answer :****This is another recursion procedure which is the number of times the procedure is called recursively in the process of enlarging a given argument or arguments. Usually this quantity is not obvious except in the case of extremely simple recursive functions, such as FACTORIAL (N), for which the depth is N.**

**Question 14. Explain About The Algorithm Ord_words?****Answer :****This algorithm constructs the vectors TITLE, KEYWORD and T_INDEX.**

**Question 15. Which Are The Sorting Algorithms Categories?****Answer :****Sorting algorithms can be divided into five categories:****a) insertion sorts****b) exchange sorts****c) selection sorts****d) merge sorts****e) distribution sorts**

**Question 16. Define A Brute-force Algorithm. Give A Short Example.?****Answer :****A brute force algorithm is a type of algorithm that proceeds in a simple and obvious way, but requires a huge number of steps to complete. As an example, if you want to find out the factors of a given number N, using this sort of algorithm will require to get one by one all the possible number combinations.**

**Question 17. What Is A Greedy Algorithm? Give Examples Of Problems Solved Using Greedy Algorithms.?****Answer :****A greedy algorithm is any algorithm that makes the local optimal choice at each stage with the hope of finding the global optimum. A classical problem which can be solved using a greedy strategy is the traveling salesman problem. Another problems that can be solved using greedy algorithms are the graph coloring problem and all the NP-complete problems.**

**Question 18. What Is A Backtracking Algorithm? Provide Several Examples.?****Answer :****It is an algorithm that considers systematically all possible outcomes for each decision. Examples of backtracking algorithms are the eight queens problem or generating permutations of a given sequence.**

**Question 19. What Is The Difference Between A Backtracking Algorithm And A Brute-force One?****Answer :****Due to the fact that a backtracking algorithm takes all the possible outcomes for a decision, it is similar from this point of view with the brute force algorithm. The difference consists in the fact that sometimes a backtracking algorithm can detect that an exhaustive search is unnecessary and, therefore, it can perform much better.**

**Question 20. Describe Divide And Conquer Paradigm.?****Answer :****When a problem is solved using a divide and conquer algorithm, it is subdivided into one or more subproblems which are all similar to the original problem in such a way that each of the subproblems can be solved independently. In the end, the solutions to the subproblems are combined in order to obtain the solution to the original problem.**

**Question 21. Describe On Short An Insertion Sorting Algorithm.?****Answer :****An algorithm that sorts by insertion takes the initial, unsorted sequence and computes a series of sorted sequences using the following rules:****a) the first sequence in the series is the empty sequence****b) given a sequence S(i) in the series, for 0<=i**

**Question 22. Which Are The Advantages Provided By Insertion Sort?****Answer :****Insertion sort provides several advantages:****a) simple implementation****b) efficient for small data sets****c) adaptive – efficient for data sets that are already substantially sorted: the time complexity is O(n + d), where d is the number of inversions****d) more efficient in practice than most other simple quadratic, i.e. O(n2) algorithms such as selection sort or bubble sort; the best case (nearly sorted input) is O(n)****e) stable – does not change the relative order of elements with equal keys****f) in-place – only requires a constant amount O( 1) of additional memory space****g) online – can sort a list as it receives it**

**Question 23. Shortly Describe The Quicksort Algorithm.?****Answer :****In quicksort, the steps performed are the following:****a) pick an element, called a pivot, from the list****b) reorder the list so that all elements with values less than the pivot come before the pivot, while all elements with values greater than the pivot come after it (equal values can go either way)****c) recursively sort the sub-list of lesser elements and the sub-list of greater elements.**

**Question 24. What Is The Difference Between Selection And Insertion Sorting?****Answer :****In insertion sorting elements are added to the sorted sequence in an arbitrary order. In selection sorting, the elements are added to the sorted sequence in order so they are always added at one end.**

**Question 25. What Is Merge Sorting?****Answer :****Merging is the sorting algorithm which combines two or more sorted sequences into a single sorted sequence. It is a divide and conquer algorithm, an O(n log n) comparison-based sorting algorithm. Most implementations produce a stable sort, meaning that the implementation preserves the input order of equal elements in the sorted output.**

**Question 26. Which Are The Main Steps Of A Merge Sorting Algorithm?****Answer :****Sorting by merging is a recursive, divide-and-conquer strategy. The basic steps to perform are the following:****a) divide the sequence into two sequences of length****b) recursively sort each of the two subsequences****c) merge the sorted subsequences to obtain the final result**

**Question 27. Provide A Short Description Of Binary Search Algorithm.?****Answer :****Binary search algorithm always chooses the middle of the remaining search space, discarding one half or the other, again depending on the comparison between the key value found at the estimated position and the key value sought. The remaining search space is reduced to the part before or after the estimated position.**

**Question 28. What Is The Linear Search Algorithm?****Answer :****Linear search is a method for finding a particular value in a list which consists of checking every one of its elements, one at a time and in sequence, until the desired one is found. It is the simplest search algorithm, a special case of brute-force search. Its worst case cost is proportional to the number of elements in the list; and so is its expected cost, if all list elements are equally likely to be searched for. Therefore, if the list has more than a few elements, other methods (such as binary search or hashing) may be much more efficient.**

**Question 29. What Is Best-first Search Algorithm?****Answer :****It is a search algorithm that considers the estimated best partial solution next. This is typically implemented with priority queues.**

**Question 30. What Is Huffman Coding?****Answer :****In computer science and information theory, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol (such as a character in a file) where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol.**

- COMPANY CAREER PAGE DIRECT LINKCompany Career Page Links :
- Write SQL Program To Find Rising TemperatureWrite an SQL query to find all dates’ Id with higher temperatures compared to its previous dates (yesterday). Table: Weather +—————+———+ | Column Name | Type | +—————+———+ | id | int | | recordDate | date | | temperature | int | +—————+———+ id is the primary key for this table. This table contains information about the … Read more
- Maximizing Your Savings: 5 Income Tax Changes in Budget 2023Maximizing Your Savings: 5 Income Tax Changes in Budget 2023. Explore the latest updates to the income tax system in India and learn how to maximize your savings with the 5 key changes announced in Budget 2023. From increased tax rebates to revised income tax slabs, this comprehensive guide will help you understand the impact … Read more
- Write SQL Program To Find Second Highest SalaryWrite an SQL query to report the second-highest salary from the Employee table. If there is no second-highest salary, the query should report null. SQL schema Create table If Not Exists Employee (id int, salary int) Truncate table Employee insert into Employee (id, salary) values (‘1’, ‘100’) insert into Employee (id, salary) values (‘2’, ‘200’) insert into Employee … Read more
- SQL Program Interview QuestionsThis page of gradjobopenings.com offers a comprehensive list of frequently asked SQL interview questions and answers to help you prepare for your next programming job interview. The questions cover a range of topics including SQL basics, data management, database design, advanced queries, and more. Brush up on your SQL skills and ace the interview with … Read more