This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Kwangshin on 2015-09-17. | |
* Email : kwangshin@gmail.com | |
*/ | |
public class TwoRectanglesArea { | |
public int getAreaOfTwoRectangles(int K, int L, int M, int N, int P, int Q, int R, int S) { | |
// Get the sum of area of two rectangles separately, i.e., no concern about the overlapped area. | |
long twoRectanglesAreaSeparately = this.getTwoRectanglesAreaSeparately(K, L, M, N, P, Q, R, S); | |
// Overlapping area right is the smaller value in two rectangles right values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="row"> | |
<div class="col-sm-6 col-md-4 col-md-offset-4"> | |
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1> | |
<div class="account-wall"> | |
<img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120" | |
alt=""> | |
<form class="form-signin"> | |
<input type="text" class="form-control" placeholder="Email" required autofocus> | |
<input type="password" class="form-control" placeholder="Password" required> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
public int equi ( int[] A ) { | |
int result = -1; | |
for(int i = 0; i < A.length; i++) { | |
if (lowerBound(A,i) == upperBound(A,i)) { | |
result = i; | |
break; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 100-score solution for http://codility.com/demo/take-sample-test/ | |
function equi(array) { | |
var i, | |
len = array.length, | |
sum = 0, | |
leftSum = 0, | |
rightSum; | |
for (i = 0; i < len; i++) { |