Shreyas
BAN USER
Comments (3)
Reputation 20
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Check geeksforgeeks.org/find-two-rectangles-overlap/
This link has all the explaination.
But the code needed to be updated to include the border test cases for the Amazon SDE test.
// If one rectangle is on left side of other
if (l1.x >= r2.x || l2.x >= r1.x)
return false;
// If one rectangle is above other
if (l1.y =< r2.y || l2.y =< r1.y)
return false;
Comment hidden because of low score. Click to expand.
2
of 2 vote
2 types - Semantic & non-semantic.
Semantic tags are self-explanatory.
for ex. -
<img>
says it is a image tag
<form>
tag says it is a form
<table>
represents a table on the page.
HTML5 has new semantic tags like
<footer>
<main>
<header>
non-semantic tags include
<span>
<div>
<p>
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Complexity - O(n)
- Shreyas October 10, 2016