Giter Site home page Giter Site logo

banner

Top Languages

📍 Profile Visitor Count

Latest Projects

Here are some of the projects I have been working on recently

💻 Expertise

✔️ C/CPP

✔️ Python

✔️ Java

✔️ C#

✔️ Assembly (intel 8080, intel 8086, intel 8088)

✔️ HTML, CSS, JavaScript, PHP

✔️ MYSQL, SQL,

✔️ react, angular, ASP.Net

fazeel khalid's Projects

advance-shell-in-c-language icon advance-shell-in-c-language

it will handel all external, some internal command like cd, exit, jobs and help, also handel pipe and background and fore ground jobs

autoplayer-chess-with-alpha-beta-pruning icon autoplayer-chess-with-alpha-beta-pruning

Game of chess has been a classic AI problem and these days there are several excellent open source implementations of automatic chess players are available on line. In this assignment we are going to make yet another FAST-chess player that will play chess using some well-established strategies along with MINIMAX to compute moves for a chess player. To complete this assignment you have been provided with an abstract base class called chessPlayer and two demo player classes named humanPlayer and autoPlayer. Along with these two class, another class, called gameState, is also provided that holds state of the game at any given time. The state of the chess at any given time consists of information about player turn (i.e. an enumeration called Color with a value of 1 means WHITE player will move and 0 means BLACK player will move) and an 8 x 8 chess board with chess pieces encoded as shown below.

binary-tree-complete-implementation icon binary-tree-complete-implementation

complete implimentation of binary tree with inorder,preorder postorder, levelorder and spiral order triversal plus implimentation of mirror tree of BST

concatinate-and-delete-data icon concatinate-and-delete-data

concatinate two doubly linked list such that copy datra of list2 in to list2. secondly design a function that delete all data except given key

database-real-time-problem-and-solution icon database-real-time-problem-and-solution

This repository contains almost every problem significant for the exam or the interviews, especially for the database engineer's interview. Yor are always welcome the collaboration in it.

design-a-datatype-mystring icon design-a-datatype-mystring

It can add subtract multiply and divide string types objects you can add object element by element or concatinate two mystring type objects

design-and-analysis-of-algorithms--spring-2021-assignment-3 icon design-and-analysis-of-algorithms--spring-2021-assignment-3

Problem 1 Suppose you want to place bill boards to advertise about your new business on the roads of your city. The idea is to place billboards only on the junctions to get maximum visibility as lots of people pass through those junctions. Placing a bill board cost you X Rs. You want to place these bill boards such that each road of the city is covered (i.e. one board must be placed at least to one of the junctions connecting that road). Your objective is to place the boards such that all roads are covered with minimum cost. Being a computer science expert, you model the road network as a graph where roads are edges and junctions are vertices. One of your friends asks you to apply greedy approach to minimize your cost. He asks you to place a board on the junction/vertex that has maximum degree (this way maximum number of roads will be covered) and then place the next board on the junction/vertex that has maximum uncovered roads. Keep doing this until all roads are covered. Is this greedy strategy optimal? If yes then give an informal correctness proof. Otherwise give a counter example. Problem 2 You are recently appointed as an intern of company ABC for n weeks. You team lead has assigned you n tasks t1, t2, t3, ... , tn. You have to submit one task every week but you can do these tasks in any order. Each task i requires hi hours to complete (h1 hours for task t1, h2 hours for task t2 and so on). If you submit task ti on week j then you will be paid hi*(n-j)$. You want to maximize your earning. Give a greedy algorithm that can determine the order in which you should perform the tasks to maximize your income. Give n informal proof of correctness for you algorithm. Problem 3 We use Huffman's algorithm to obtain an encoding of alphabet {a, b, c} with frequencies fa, fb, fc. In each of the following cases, either give an example of frequencies (fa; fb; fc) that would yield the specified code, or explain why the code cannot possibly be obtained (no matter what the frequencies are). (a) Code: {0, 10, 11} (b) Code: {0, 1, 00} (c) Code: {10, 01, 00} Problem 4 Ternary Huffman. Trimedia Disks Inc. has developed ternary hard disks. Each cell on a disk can now store values 0, 1, or 2 (instead of just 0 or 1). To take advantage of this new technology, we need a modified Huffman algorithm for compressing sequences of characters from an alphabet of size n, where the characters occur with known frequencies f1, f2, ..., fn. Your algorithm should encode each character with a variable-length code word over the values 0, 1, 2 such that no code word is a prefix of another code word and so as to obtain the maximum possible compression. a. Design an algorithm for finding optimal code. b. Analyze the running time of your algorithm as a function of n, the number of unique characters. c. Prove that your algorithm works (Give informal argument).

design-and-analysis-of-algorithms--spring-2021-assignment-4 icon design-and-analysis-of-algorithms--spring-2021-assignment-4

Problem 1 The spread of third wave of COVID-19 in Pakistan has resulted in closure of academic Institutes. The management of FAST Lahore decided to save your academic year by conducting online sessions (video lectures). There are total n videos that need to be streamed one after the other. Each video vi consists of bi bits that needs to be sent at a constant rate over a period of ti seconds. There is only one connection allowed so two videos can’t be sent at a time. This means scheduling of videos is required (an order in which to send these videos). Whichever order is chosen, there cannot be any delays between the end of one video and the start of the next. The connection does not want its user taking up too much bandwidth, so it imposes the following constraint, using a fixed parameter r: For each natural number t > 0, the total number of bits you send over the time interval from 0 to t cannot exceed r*t. A schedule is considered valid if it satisfies the constraint imposed by the connection. You are a computer science expert and management of FAST need your services. Given a set of n video streams specified by its number of bits bi and its time duration ti, they need to determine whether there exists a valid schedule that satisfies connection parameter r. For example you have 3 videos with (b1,t1)=(2000,1), (b2,t2)=(6000,2) and (b3,t3)=(2000,1) also r=5000. The schedule that runs videos in order 1, 2, 3, is valid because at time t=1 the first stream is sent and 2000 < 5000*1 at time t=2 2000+3000(half of second video)<5000*2 similar calculation can be done to check the constraint for t=3 and t=4. a. Design an efficient algorithm that takes a set of n streams each specified by bi and ti along with r and determines whether a valid schedule exists or not. b. Analyze the running time of your algorithm as a function of n. c. Prove that your algorithm works (Give informal argument). Problem 2 Suppose that instead of always selecting the first activity to finish, we instead select the last activity to start that is compatible with all previously selected activities. Describe how this approach is a greedy algorithm, and prove that it yields an optimal solution. Problem 3 Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in any lecture hall. We wish to schedule all the activities using as few lecture halls as possible. Give an efficient greedy algorithm to determine which activity should use which lecture hall. Problem 4 Alice wants to throw a party and is deciding whom to call. She has n people to choose from, and she has made up a list of which pairs of these people know each other. She wants to pick as many people as possible, subject to two constraints: at the party, each person should have at least five other people whom they know and five other people whom they don't know. Give an efficient algorithm that takes as input the list of n people and the list of pairs who know each other and outputs the best choice of party invitees. Give the running time in terms of n.

design-finite-automata icon design-finite-automata

Problem 1: For languages L1 to L10 over alphabets {a,b} do the following a) Enumerate some elements b) Draw a Deterministic Finite Automata  L1: The language of all strings containing even number of a’s and each a is followed by at least one b.  L2:The language that has even length and odd number of a’s.  L3:The language of all strings in which every pair of adjacent b’s appear before any pair of adjacent a’s.  L4:The language of all strings containing no more than one occurrence of the string aa. (the string aaa should be viewed as containing 2 occurrences of aa)  L6: The language of all strings that begins and end with a triple letter( aaa or bbb)  L7: The language of all strings containing at least two a’s and at most one b. Problem 2a: For languages L1 to L10 over alphabets {0,1} do the following a) Enumerate some elements b) Draw a Deterministic Finite Automata  L1: strings over {0,1} such that their decimal equivalent is multiple of 5 Eg: {0, 101,1010…..}  L2: all strings over {0,1} that start with 0 and end with 010 and do not have 000 as part of a string.  L3: all the string x in which n 0 (x)%3=0 and n 1 (x)%3!=0  L4: all the string x in which n 0 (x)%3=0 and n 1 (x)%3=0  L5: L4 U L3  L6= L1’ School of Computer SciencePage2 Problem 2a: Run DFA of L1 of problem 2 for following strings, and answer which ones are accepted and which are rejected {000111, 101000, 10110100,0000100000}

disk-management-system-in-c-linux- icon disk-management-system-in-c-linux-

practical-case-study-e-operating-systems-programming--300698-1-introduction-in-this-workshop-you-will-be-implementing-a-file-system-simulator-loosely-based-on-historic-file-systems-the-file-system-will-be-have-the-following-properties--it-is-a-single-level-directory-system--the-directory-entry-has-the-following-format-struct-entry--char-user-char-name9-char-extension4-short-blockcount-short-block8--with-the-name-and-extension-fields-being-c-strings-this-structure-is-32-bytes-in-size--the-disk-size-is-160-kbyte-this-is-roughly-one-side-of-a-5-1-4-00-inch-disk--the-smallest-unit-of-allocation-is-1-kbyte--the-main-directory-occupies-the-first-block-of-the-disk-block-0-and-its-size-is-fixed-at-1-block-so-there-can-only-be-32-files-in-this-file-system--as-the-directory-always-occupies-only-the-first-block-therefore-no-control-information-about-it-needs-to-be-stored-in-the-directory-ie-no--entry--the-only-user-is-user-1--user-1-is-not-a-valid-user-and-could-be-used-to-mark-free-directory-entries--alongside-the-directory-you-also-need-a-bitmap-that-is-capable-of-representing-all-of-the-blocks-available-on-the-disk-this-can-be-a-free-space-bitmap-or-an-allocation-bitmap-this-is-your-choice-this-structure-is-not-stored-on-the-disk-but-would-be-computed-by-the-operating-system-when-the-disk-was-inserted-you-are-not-supposed-to-implement-the-actual-storage-only-the-control-structures-of-the-file-system-when-implementing-the-free-bitmap-you-must-use-a-bitmap-ie-it-should-be-an-array-but-each-element-of-the-array-should-represent-several-blocks-1-2-programming-tasks-when-your-program-starts-it-will-assume-that-the-disk-is-unformatted-you-should-provide-a-menu-that-implements-the-following-options-initialise-disk-initialise-disk-control-structures-setting-the-first-block-of-the-disk-to-used-in-the-bitmap-and-marking-all-directory-entries-as-being-available-list-files-in-the-directory-list-the-names-extensions-and-block-counts-of-all-the-valid-files-in-the-directory-display-the-free-bitmap-print-the-value-of-each-of-the-bits-in-the-bitmap-this-need-not-be-pretty-just-a-long-list-of-1s-and-0s-is-sufficient-opencreate-file-scans-the-directory-and-if-the-name-provided-doesnt-exist-then-adds-that-file-to-the-directory-this-file-will-be-used-in-all-subsequent-operations-until-a-new-file-is-opened-or-it-is-deleted-read-file-list-the-blocks-occupied-by-the-currently-open-file-not-the-content-of-these-blocks-as-you-dont-store-this-information-write-file-allocate-another-block-to-the-currently-open-file-you-should-not-preallocate-blocks-for-the-file-you-should-allocate-the-first-available-block-by-scanning-the-bitmap-for-the-first-block-that-is-available-each-write-shall-add-another-block-to-the-file-until-there-are-no-more-slots-to-allocate-blocks-to-or-the-disk-runs-out-of-blocks-there-are-only-8-slots-available-for-each-file-delete-file-deallocate-all-blocks-for-the-current-file-in-the-bitmap-and-marks-as-free-the-directory-entry-for-that-file-you-need-to-pay-close-attention-to-multiple-boundary-conditions-which-exist-in-this-file-system-including-the-total-size-of-the-disk-maximum-size-of-a-file-maximum-number-of-files-etc-2-3-file-fsh-ifndef-fsh-define-fsh--prevent-multiple-inclusion--includestdinth--fsh--various-definitions-for-osp-practical-case-study-e---the-bitmap--extern-uint8t-bitmap20--160kb-disk-with-1kb-blocks--160-bits-for-bitmap---20-bytes---the-directory-entry--struct-entry--char-user-char-name9-char-extension4-short-blockcount-short-block8---the-directory--extern-struct-entry-directory32--extern-means-its-defined-in-another-file-prevents-multiple-definition-errors--int-togglebitint-block--toggles-the-value-of-the-bit-block-in-the-external-array-bitmap-returns-the-current-value-of-the-bit-does-not-validate-block--int-blockstatusint-block--returns-the-status-of-block-in-the-external-array-bitmap-returns-0-if-bitmap-bit-is-0-not-0-if-bitmap-bit-is-1-does-not-validate-block--endif-3-4-file-fsc--fsc-some-useful-functions-for-osp-practical-case-study-e--includefsh-uint8t-bitmap20-struct-entry-directory32-int-togglebitint-block--int-elemblock8-int-posblock8-int-mask1pos-bitmapelemmask-return-bitmapelemmask--int-blockstatusint-block--int-elemblock8-int-posblock8-int-mask1pos-return-bitmapelemmask--5-file-mainc-includestdioh--stdioh-will-be-found-in-the-system-path--includefsh--fsh-will-be-found-in-the-local-path--int-mainint-ac-charav--printfplease-make-me-usefuln-return-0--4-6-file-makefile-all-casee-casee-maino-fso-cc--o-5

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.