The assignment must only be done in Python programming language using version 3. exercise 1 must be made into a docker container and uploaded to docker hub assignment must be submitted by each individual in zip format The zip file must contain for exercise 1 1. The source code for Exercise 1 in python (.py) file format (if modules / packages are used then zip all python files). in the source code please add a comment to the docker hub location of the container 2. The original Docker File to run the code
The zip files must contain for exercise 2
1. The source code for Exercise 1 in python (.py) file format (if modules / packages are used then zip all python files)
Exercise 1: parenthesis balancing
parenthesis balancing: write a function that take a string of parenthesis at the input and returns the longest balanced substring at the output the string is said to be balanced when the opening parenthesis has its corresponding matching closing parenthesis. Note that an opening parenthesis cannot match a closing parenthesis that comes before it and
vice-versa
sample input :{{}}}{
output : {{}}
try and get the optimum big O notation (considering the worst case) and mention the reason for the same in a comment.
Exercise 2: Rectangle
Write a function that takes a list of cartesian co-ordinates (x,y) and returns the numbers of rectangles formed by these coordinates a rectangle should have its four corners amongst the co-ordinates to be counted as a rectangle. Only rectangles whos sides are parallel to the x and y axes to be considered
sample input = coordinates = [ [0,0],[0,1],[1,1][1,0], [2,1][2,0],[3,1],[3,0] ] try and get the optimum big O notation (considering the worst case) and mention the reason for the same in a comment.
For Complete solution of this sample assignment mail us on contact@codersarts.com
Also, If you are looking for any kind of coding help in programming languages, Contact us for instant solution
Comments