8.algorithms Faq
8.algorithms Faq
Question Bank
UNIT – I INTRODUCTION
Algorithm analysis: Time and space complexity - Asymptotic Notations and its properties Best case, Worst
case and average case analysis – Recurrence relation: substitution method - Lower bounds – searching: linear
search, binary search and Interpolation Search, Pattern search: The naïve string-matching algorithm - Rabin-
Karp algorithm - Knuth-Morris-Pratt algorithm. Sorting: Insertion sort – heap sort
PART A
1. What do you mean by algorithm?
An algorithm is a sequence of unambiguous for solving a problem i.e., for
obtaining a required output for any legitimate input in a finite amount of time. In
addition, all algorithms must satisfy the following criteria:
1) Input
2) Output
3) Definiteness
4) Finiteness
5) Effectiveness.
PROBLEM
ALGORITHM
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
PART B
13.
14.
15.
16.
17.
18.
PART C
19.
20.
PART A
21. What is JavaScript?
22. What are the primitive data types in JavaScript?
23. Mention the various Java Script Object Models.
24. What is the use of pop up boxes in java script?
25. How to create arrays in JavaScript?
26. Write a simple program in JavaScript to validate the email-id.
27. What is DOM?
28. Define JSON
29. What is the concept of exception handling in JavaScript?
30. Write any two built in objects for the math function
31. What are the different types of event handling?
32. What is the purpose of the function files?
PART B
33. How to write function using Java Script? Give Example.
34. Discuss Javascript objects in detail with suitable examples.
35. Discuss about Javascript debugging. Explain how local and global
functions can bewritten using java script
36. Explain the way in which java script handles arrays with example.
PART C
37. i) Explain any two validation function in java script.(4)
ii) Write a script to demonstrate the use of Date object.(6)
iii)Write a java script program to generate Fibonacci series using do while loop.(6)
38. Write a Java script program to print thenumbers from 0 to 50. b. Write a Java Script
program to create table.
UNIT – III SERVER SIDE PROGRAMMING
Servlets: Java Servlet Architecture- Servlet Life Cycle- Form GET and POST actions- Session Handling-
Understanding Cookies- DATABASE CONNECTIVITY: JDBC.
PART A
39. 1.Write down the methods of servlet interface
40. 3.Define Servlet Life Cycle?
41. 8.What are Servlets?
42. 14.Explain about Session tracking.
43. What is the difference between doGet() and doPost()
44. What is the difference between ServletContext and ServletConfig
45. Define cookies
46. What id JDBC?
47. How to select the data from database using MYSQL commands.
48. List out the three main methods in servlets life cycle.
49. How to create a connection to database using jdbc.
50. Write down any two differences between the cookies and session.
PART B
51. What is a servlet? Explain briefly the Servlet life cycle and Servlet HTTP package?
52. List out the classes and interfaces available in javax.servlet.http package?
53. Explain in detail about Servlet Database Connectivity with an example
of Studentdatabase.
54. Explain the architechture of a Servlet?
55. Two ways of maintaining the sessions: i. Cookies ii. Rewriting URL
PART C
56. Explain in details the JDBC CONNECTIVITY with example program.
Explain the JDBC database access in detail. Write a java servlet to conduct online
examination.
57. Example for session tracking, Shopping cart
58. Write a servlet program to implement session tracking using HTTP session object
UNIT – IV
An introduction to PHP: PHP- Using PHP- Variables- Program control- Built-in functions- Form Validation.
XML: Basic XML- Document Type Definition- XML Schema, XML Parsers and Validation, XSL .
PART A
59. What is PHP?
60. List the data types used in PHP.
61. List the important characteristics of PHP.
62. Write a simple PHP Script.
63. How do you declare a variable using PHP data types?
64. List some built in functions in PHP.
65. What is XML namespace?
66. Define XML attributes
67. Write the main difference between XML and HTMLAND WRITE THE Main Difference between XML and
HTML
68. Define DTD
69. What are the different XSLT elements
70. What is the importance of SAX?
PART B
71. List and explain the XML syntax rules in detail. Explain how a XML document can be displayed on a browser.
72. Explain the following: i) XML namespace ii) XML style sheet. iii)XML attributes iv)XML Schema
73. Explain the steps in the PHP code for querying a database with suitable examples.
74. Explain about the control statements in PHP with example.
75. Explain about External DTD and their categorization with examples.
PART C
76. a) Design simple calculator using PHP
b) Design application to send a email using PHP
77. Develop a shopping cart application using PHP with use of cookies.
UNIT – V
Introduction to AngularJS, MVC Architecture, Understanding ng attributes, Expressions and data binding,
Conditional Directives, Style Directives, Controllers, Filters, Forms, Routers, Modules, Services; Web
Applications Frameworks and Tools – Firebase- Docker- Node JS- React- DjangoUI & UX.
PART A
78. What is AngularJS? Briefly explain its key features.
79. Describe the MVC architecture in AngularJS. What are the roles of Model, View, and Controller?
80. What is the purpose of ng-app and ng-model directives in AngularJS?
81. How do you use the ng-repeat directive to iterate over an array in AngularJS?
82. How do you create a simple form in AngularJS using the ng-form directive
83. What is Firebase? How can it be used in conjunction with AngularJS to build web applications?
84. Briefly describe the role of Docker in web development. How can it be used to deploy AngularJS
applications?
PART B
85. Explain the core concepts of AngularJS and discuss how it differs from traditional JavaScript
frameworks. Provide examples of how AngularJS enhances web development.
86. Describe the Model-View-Controller (MVC) architecture. How does AngularJS implement the MVC
pattern, and what are the advantages of using MVC in web application development?
87. Describe how AngularJS handles forms and form validation. Explain the use of directives like ng-
model, ng-submit, and ng-form in managing user input and validation.
88. Compare and contrast the following web application frameworks and tools: Firebase, Docker, Node.js,
React, and Django. Discuss their primary use cases, strengths, and how they integrate into modern web
development workflows.
PART C
89. Imagine you are tasked with developing a dashboard application that updates real-time data from
multiple sources. How would you leverage AngularJS to manage and display this data dynamically?
Discuss how AngularJS’s features would benefit this use case
90. Considering UI/UX principles, how would you use AngularJS to enhance user experience in a complex
application with multiple interactive elements? Discuss how AngularJS’s features contribute to creating
a responsive and user-friendly interface
91. For an e-commerce application, you need to create a product detail page where the controller manages
the product data and handles user interactions like adding items to the cart. How would you structure
the controller to handle these responsibilities?