You are on page 1of 3

Instructions:

* Provide actual working code in a programming language of your choice for these assignments
* Do not use psuedocode
* Optimize your solutions for both time and space complexity
* Wherever possible, indicate the complexity of your solution (e.g. O(log n))
* Do not ask anyone else or look online for solutions to these problems
* If you are uncertain about any of the questions, make reasonable assumptions, document them, and
proceed with your solution
Question 1). Programming assignment:
Build an e-commerce website.
Website requirements:
* The customer will log into the website and select a product within a product category
* The customer may filter the products based on parameters such as price, brand name, number of
reviews, etc.
* The customer may then select one or more products and order them
* The customer may also see ads related to the products and brands they have shown interest in
Backend requirements:
* The vendors will update the product database periodically with new products, stock, and price
information
* All the user activity is logged in the database
Deliverables:
Provide the following:
* The web application (in a programming language of your choice) including a product search and
selection form for the user
* The database schema (including tables, columns, column types, primary and foreign keys, indexes,
etc.)
* The following SQL queries:
1) Retrieve all the details of the second largest category having maximum number of products
2) Retrive the products in the database which have their cost reduced by 20% within a span of 2 days
3) Retrieve the details of the product which was bought by maximum number of customers within a
month
4) Search for a product name in the database, assuming we don't have the exact product name match in
the database. Get the best suggestions present in the database for any given product name.
Question2). Programming assignment:
Sudoku.
* Consider a typical Sudoku matrix, 9 sets of 3x3 squares or a single 9x9 squares (e.g.
http://en.wikipedia.org/wiki/File:Sudoku-by-L2G-20050714.svg)
* Every row in the matrix uses the integers 1 through 9 exactly once
* Every column in the matrix uses the integers 1 through 9 exactly once
* Every sub-matrix (3x3 square) in the matrix uses the integers 1 through 9 exactly once

Deliverables:
* Write a program to fill a 9x9 matrix S according to the Sudoku matrix properties described above
* Also, generate three different matrices from the matrix generated above with the following
transformations and verify that they are valid Sudoku matrices also:
** Switch the numbers in the fifth and sixth row of S
** Swap all 3's and 4's in S
** Rotate S by 90 degrees
Question3). Write a regular expression to extract the birth date, location, and age of cricketers from all
pages similar to this one:
http://www.espncricinfo.com/ci/content/player/28794.html
Question4). Review the code attached and answer the following questions:
Note: Check the image in pdf(Question4.pdf) attached.
* What is the action intended for this piece of code?
* How can it be improved?
Question5). Review the attached database schema and answer the following questions:
Note: Check the image present in the next page
* Describe what this schema represents
* Give examples of data that can be stored in this database

You might also like