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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
///<summary> | |
/// its just everything instanced, nothing is implemented | |
/// its up to you to design and crate functions. | |
///</summary> | |
namespace Softtek.Academia.CursoDotNet.Ejercicio2{ //name of the DLL | |
//Contoller class | |
public class Program:ProgramaDeConsola |
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
# Calculate the nth Fibonacci number, f(n). Using invariants | |
def fibo_tr(n, acc1, acc2) | |
if n == 0 | |
0 | |
elsif n < 2 | |
acc2 | |
else | |
return fibo_tr(n - 1, acc2, acc2 + acc1) | |
end | |
end |
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
require "mscorlib" | |
require "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" | |
require "System.Collections.Generic, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" | |
require "System.Text, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" | |
# <summary> | |
# its just everything instanced, nothing is implemented | |
# its up to you to design and crate functions. | |
module Softtek.Academia.CursoDotNet.Ejercicio2 #name of the DLL | |
#Contoller class | |
class Program < ProgramaDeConsola |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace Excercise1{ | |
public Class Program { | |
public static void Main(string[] args) | |
{ | |
int[] a = {1, 3, 5}; | |
int[] b = {2,4}; |
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
using System.Collections.Generic; | |
public int smallElement(int k) | |
{ | |
Node<T> node = Root; | |
int count = k; | |
int sizeOfSubTree =0; | |
while (node != null) |
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
InputStream is = null; | |
int i; | |
char c; | |
try{ | |
// new input stream created | |
is = new FileInputStream("C://test.txt"); | |
System.out.println("Characters printed:"); | |
This file has been truncated, but you can view the full file.
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:a04c38d9604adb7eb9ca89860dfa1ef72db66037cc2c07c391ef8e67a31f9254" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
var numberOfYears: Int = 4 | |
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
CONST.TIME.LIMIT <- 6 # threshold of time(sec) for searching. | |
CONST.MAX.DEPTH <- 3 # max depth of depth-first searching. | |
##' main | |
othello <- function(verbose = FALSE) { | |
## initialize. | |
board <- as.numeric(rep(0,8^2)) | |
turn <- 1 | |
board[conv.xy2index(4,4)] <- board[conv.xy2index(5,5)] <- 1 | |
board[conv.xy2index(4,5)] <- board[conv.xy2index(5,4)] <- -1 |