Code Monkey home page Code Monkey logo

veriyapilari_lab1's Introduction

Veri Yapiları LAB1

Ders Yürütücüsü: Prof. Yahya KARSLIGİL

Konu : Linkli Liste Kullanımı

Bu ödevde dinamik bellek yönetimi ile, belleği linkli liste yapısında kullanan diziler ile ilgili bir uygulama yapmanız istenmektedir.

Problem: Aşağıdaki işlemleri gerçekleştiriniz :

  1. A ve B dizilerini okuyacağınız küçükten büyüğe sıralı elemanlar ile(dizi elemanlarını sıralı sayılar olacak şekilde okumanız yeterli, sıralama yapmanız istenmiyor) oluşturunuz. İki dizinin her elemanını dinamik bellek kullanımı ile belleğe yerleştirip linkli liste yapısında saklayınız.

  2. A ve B dizilerini yazdırınız.

  3. Bu iki dizinin kesişimini ve birleşimini oluşturan elemanları bularak C(kesişim) ve D(birleşim) dizilerini yine linkli liste yapısında ve sıralı olarak elde ediniz. Kesişim ve birleşim işlemini yaparken dizilerin sıralı olmasından faydalanınız.

  4. Elde ettiğiniz ve C ve D dizilerini yazdırınız.

Örnek : Okuduğunuz A dizisi ve B dizisi aşağıdaki gibi iken C ve D dizileri aşağıdaki gibi bulunmalıdır.

A : 2 -> 5 -> 9 -> 11
B : 1 -> 2 -> 7 -> 9
Kesişim dizisi C : 2 -> 9 Birleşim dizisi D : 1 -> 2 -> 5 -> 7 -> 9 -> 11

Not 1 : Belleğin dinamik kullanımı için dizilerin her elemanını malloc() fonksiyonu ile yer tutarak linkli liste yapısı ile saklayınız.

Not 2 : İşlemleri anlamlı modüllere bölerek fonksiyonlar halinde yazmaya özen gösteriniz.

veriyapilari_lab1's People

Contributors

ozgurkan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.