This file contains hidden or 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
import math._ | |
import scala.util._ | |
/** | |
* Created by Alex on 20.06.15. | |
*/ | |
/** | |
* Auto-generated code below aims at helping you parse | |
* the standard input according to the problem statement. | |
**/ |
This file contains hidden or 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
object Solution { | |
def main(args: Array[String]) { | |
/* Enter your code here. | |
Read input from STDIN. | |
Print output to STDOUT. | |
Your class should be named Solution | |
*/ | |
///>>> it seems that something faster than O(N) needed | |
///> QuickSortMerge may be ? O(N * log(N)) ??? |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
import sys | |
import math | |
# Auto-generated code below aims at helping you parse | |
# the standard input according to the problem statement. | |
n = int(input()) | |
# Write an action using print | |
# To debug: print("Debug messages...", file=sys.stderr) |
This file contains hidden or 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
def lonely_Integer( | |
b: list# of int | |
) -> int: | |
so_Far = set() | |
answer = 0 | |
for n in b: | |
if n in so_Far: | |
so_Far.discard(n) | |
else: |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
#utf_8 U8, UTF, utf8 | |
"""Capitalize.py: | |
interactive Python sessions for doctest | |
must be in the `right` place | |
in order to be executed |
This file contains hidden or 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
object Solution extends App{ | |
import scala.annotation.tailrec | |
import scala.io.StdIn | |
import scala.util.{Try, Success, Failure} | |
import scala.math.pow//{abs, pow, ceil, floor} | |
// as replacement of this Java styled code | |
/* |
This file contains hidden or 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
#!/usr/bin/env scala | |
// for The `bash` `shell script` './script.sh' | |
// | |
//import scala.math.{log, ceil} | |
import io.AnsiColor._ | |
// or | |
//import Console.{GREEN, RED, RESET, YELLOW_B, UNDERLINED} | |
// | |
// | |
// ? Is something wrong with: |
This file contains hidden or 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
"use strict"; | |
// | |
var binary_Search_Tree_Name_Space = {}; | |
// | |
// Done: implement `get_UnBalanced_Sub_Tree` | |
// recursive, but not @tail recursive | stack safe | |
// traversal from top to bottom | |
/** it must return: | |
- [unBalanced_Sub_Tree object, balance_Factor] if any | |
- or [null, 0] if not found|search fails |
This file contains hidden or 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
#!/usr/bin/env scala | |
// for The `bash` `shell script` './script.sh' | |
// but App main object warper must be disabled|excluded | |
import scala.io.AnsiColor._ | |
// it is imported twice in the same scope by | |
//import scala.Console._ | |
// | |
// | |
/*object digital_Circuit_Logic_Gates extends App */{ | |
/* A digital circuit is composed |
OlderNewer