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
#listenin sonu yigitin basi olarak ayarlandi | |
class Stack: | |
def __init__(self): | |
self.liste = [] | |
def isEmpty(self): | |
return self.liste == [] | |
def push(self, eleman): | |
self.liste.append(eleman) | |
def pop(self): | |
return self.liste.pop() |
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
class Queue: | |
def __init__(self): | |
self.liste = [] | |
def isEmpty(self): | |
return self.liste == [] | |
def enqueue(self, item): | |
self.liste.insert(0, item) |
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
class Stack | |
def initialize | |
@liste = [] | |
end | |
def isEmpty | |
return @liste == [] | |
end |
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 | |
#Listenin sonu yigitin tepesi | |
class Stack: | |
def __init__(self): | |
self.liste = [] | |
def isEmpty(self): | |
return self.liste == [] | |
def push(self,eleman): | |
self.liste.append(eleman) | |
def peek(self): |
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
# -*- coding: utf-8 -*- | |
#Taban donusturme | |
class Stack: | |
def __init__(self): | |
self.liste = [] | |
def isEmpty(self): | |
return self.liste == [] |
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
# -*- coding: utf-8 -*- | |
#İkili tabana donusturme | |
class Stack: | |
def __init__(self): | |
self.liste = [] | |
def isEmpty(self): | |
return self.liste == [] |
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
#Dengeli parantez | |
from stack import* | |
def dengeliMi(ifade): | |
s = Stack() | |
deger = True | |
sayac = 0 | |
while sayac < len(ifade) and deger: | |
karakter = ifade[sayac] |
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
#Listenin sonu, yigitin tepesi olarak kabul edilmistir. | |
class Stack: | |
def __init__(self): | |
self.liste = [] | |
def isEmpty(self): | |
return self.liste == [] | |
def push(self, item): |
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
class Fraction: | |
def __init__(self, pay, payda): | |
self.pay = pay | |
self.payda = payda | |
def goster(self): | |
print self.pay, "/", self.payda | |
def __str__(self): |
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
package main | |
import "fmt" | |
func main(){ | |
i := 0 | |
for i <= 100{ | |
if i % 3 == 0 && i % 5 == 0 { |