<commit_before>/**
 * https://leetcode.com/problems/sqrtx/
 * 
 * 
 */ 
class Solution {
    func mySqrt(_ x: Int) -> Int {
        if x == 1 { return 1 }
        var left = 1
        var right = x
        while left < right {
            let mid = left + (right - left) / 2
            if mid * mid > x {
                right = mid
            } else {
                left = mid + 1
            }
        }
        return left - 1
    }
}<commit_msg>Add sqrtx.swift<commit_after>/**
 * https://leetcode.com/problems/sqrtx/
 * 
 * 
 */ 
class Solution {
    func mySqrt(_ x: Int) -> Int {
        if x == 1 { return 1 }
        var left = 1
        var right = x
        while left < right {
            let mid = left + (right - left) / 2
            if mid * mid > x {
                right = mid
            } else {
                left = mid + 1
            }
        }
        return left - 1
    }
}/**
 * https://leetcode.com/problems/sqrtx/
 * 
 * 
 */ 
// Date: Thu Jul  9 11:59:43 PDT 2020
class Solution {
    func mySqrt(_ x: Int) -> Int {
        var left = 1
        var right = x + 1
        while left < right {
            let mid = left + (right - left) / 2
            if mid * mid >= x {
                right = mid
            } else {
                left = mid + 1
            }
        }
        return left * left == x ? left : left - 1
    }
}

class Solution {
    func mySqrt(_ x: Int) -> Int {
        var left = 1
        var right = x + 1
        while left < right {
            let mid = left + (right - left) / 2
            if mid * mid > x {
                right = mid
            } else {
                left = mid + 1
            }
        }
        return left - 1
    }
}

{'fraction_non_alphanumeric': 0.11240535818287711, 'fraction_numerical': 0.0192195690157251, 'mean_word_length': 0.9434389140271493, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3900812', 'n_tokens_mistral': 573, 'n_tokens_neox': 516, 'n_words': 169}