Instabase | online coding round [Reject]
Anonymous User
10494

1 -> Rectangle intersection :
rectangle can be expressed by 4 number (x1, y1) bottom left , (x2, y2) top right
given two lines (two rect.) find one if they are intersecting,
if "yes" then :
create the smallest rect. that can fit both without changing their location and give area of that smallest rect.
if "No" then
just give sum of two rect's area.

kinda similar to this one : https://leetcode.com/problems/rectangle-overlap/

2 - > finding substring that matches some pattern:
input : string
problem : string will definalty contain a code-id with patter like 5 char followed by 4 digit followed by 1 char and name of website. Given a string find one that code-id and domain name (website name but without www)

solution : I solved it using python regex. All testcases passed

3 -> kinda like this one -> https://leetcode.com/problems/exclusive-time-of-functions/
Full problem statement : there is party and people can come and go at any time, given N number of people and their entry timestamp en and exit time stamp ex find the minimum number of chair I should occupy so that every guest has chair to sit during his/her time in party. One guest can come and go only once .

b

Comments (2)