Skip to content

Instantly share code, notes, and snippets.

View merbussa's full-sized avatar
💻
I may be slow to respond.

Meryem Büşra SAKA merbussa

💻
I may be slow to respond.
View GitHub Profile
// Ağaçta tutulacak herbir elemanı tanımlayan sınıf
class Node {
int key; // elemanın değeri
Node leftChild, rightChild; // sol ve sağ elemanların erişim bilgileri
// yapıcı işlev, parametre değerlerinin ilgili öz niteliklere atar
Node(int key, Node leftChild, Node rightChild) { ... }
}
// Ağaç veri yapısını, "ikili arama ağacı" olarak tanımlayan sınıf
// search işlevi, key değerine sahip elemanı bulup erişim bilgisini verir
public Node search(int key) {
return search(key,root); // öz yinelemeli iç işlevi çağır
}
// parametrede verilen key değerine sahip elemanı, kökü t olan ağacın veya alt ağacın altında arar
// öz yinelemeli iç işlev, öz nitelik erişimi olmadığı için "static"
private static Node search(int key, Node t) {
if(t==null) // kök yoksa (bu alt ağaç boşsa),
return null; // bulamadık
def dec2fib(n): #Ozyineli fibonacci mantigiyla fibonacci dizisini buldurur.
if n==0:
return 0
elif n==1:
return 1
else:
return (dec2fib(n-1) + dec2fib(n-2))
def indis_parcala(a): #Fibonacci dizisinde yerine '1' koyulmasi gereken indisleri dondurur.
i=1
while a > i:
import java.util.Scanner;
public class kullanıcıkup
{
public static void main(String[] args)
{
Scanner s=new Scanner(System.in);
System.out.println("Lütfen bir sayı giriniz.");
int a=s.nextInt();
hesapla(a);
public class kup
{
public static void main(String[] args)
{
hesapla(5);
}
static void hesapla(int a)
{
System.out.println(a*a*a);
}
public class parametresiz
{
public static void main(String[] args){
yaz();
}
static void yaz()
{
System.out.println("Bu method cagrildi.");
#include <stdio.h>
int main(void) {
int ay,gun;
printf("Lütfen bir tarih giriniz.(gün/ay) : ");
scanf("%d/%d",&gun,&ay);
switch (ay) {
case 12:
ay=365-(31-gun);
/*copyright ftastemur */
#include <stdio.h>
int main(void)
{
int sayi,flag=0, i;
printf("Bir sayi giriniz: ");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int
cmpstringp(const void *p1, const void *p2)
{
/* The actual arguments to this function are "pointers to
pointers to char", but strcmp(3) arguments are "pointers
to char", hence the following cast plus dereference */
#include <stdio.h>
#define ROT 13
int main(void)
{
int c, c_yeni;
while((c = getchar()) != EOF){
if(c >= 'A' && c <= 'Z'){
if((c_yeni = c + ROT) <= 'Z')