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
typedef char* STRING; | |
typedef struct ListeElemani ListeElemani; | |
typedef struct { | |
ListeElemani *ListeBasi; | |
} Liste; | |
struct ListeElemani { | |
STRING deger; | |
Liste* iliskiler; | |
ListeElemani *sonraki; | |
}; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
void CreateMatrixBySize(int*,int,int); | |
void PrintMatrixBySize(int*,int,int); | |
void MatrixSummationFunction(int*,int*,int*,int,int); | |
int main(int argc, char *argv[]) { | |
int xSize, ySize; | |
printf("Toplama icin matrix X boyutunu belirleyin: "); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct { | |
int SatirSayisi; | |
int KolonSayisi; | |
int *dizi; // matris elemanlari satir-majör sirada bu dizide | |
} Matris; | |
Matris *yapMatris(int nsatir, int nkolon, int *d) { |
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
struct Yigit { | |
int tepe; /* yigitin en üstündeki elemanin indeksi */ | |
int boy; /* yigitin alabilecegi en çok eleman sayisi */ | |
char *dizi; /* yigit yaratilirken verilen boyda bir dizi */ | |
}; | |
struct Yigit *yaratYigit(int boy); | |
void ekleYigit(struct Yigit *y, char X); | |
char cikarYigit(struct Yigit *y); | |
int dolumuYigit(struct Yigit *y); | |
int bosmuYigit(struct Yigit *y); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
void printArray(int *array,int n){ | |
int i; | |
for(i=0;i<n;i++){ | |
printf(" %d " , array[i]); | |
} | |
printf("\n"); | |
} |
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
public class BinaryTree { | |
int i; | |
BinaryTree right; | |
BinaryTree left; | |
public BinaryTree(int _i, BinaryTree _right, BinaryTree _left) { | |
i =_i; | |
right = _right; | |
left = _left; | |
} |
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 com.cgon.BinaryTree; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
public class JUnitTest { | |
BinaryTree node1 = new BinaryTree(2,null,null); | |
BinaryTree node2 = new BinaryTree(3,null,null); | |
BinaryTree node3 = new BinaryTree(4, node1, node2); | |
BinaryTree node4 = new BinaryTree(5, null, null); |
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 sum(f:Int=>Int)(a:Int,b:Int):Int ={ | |
if(a>b) 0 | |
else f(a) + sum(f)(a+1,b) | |
} |
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 product(f:Int=>Int)(a:Int,b:Int):Int={ | |
if(a>b)1 | |
else f(a)*product(f)(a+1,b) | |
} |
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 mapReduce(f:Int=>Int,combine: (Int,Int)=>Int, zero:Int)(a:Int,b:Int):Int ={ | |
if(a>b) zero | |
else ??? | |
} | |
def sumGN(f:Int=>Int)(a:Int,b:Int) = mapReduce(f, (x,y)=>(x+y), 0)(a, b) | |
def productGN(f:Int=>Int)(a:Int,b:Int) = mapReduce(f, (x,y)=>(x*y), 1)(a, b) |
OlderNewer