Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 QNode { | |
| int data; | |
| struct QNode *next; | |
| } QueueNode; | |
| typedef struct QueueStruct { | |
| int size; |
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> | |
| #define MAX(x,y) ((x) > (y) ? (x) : (y)) | |
| typedef struct Node { | |
| int data; | |
| struct Node *left; | |
| struct Node *right; | |
| } BSTNode; |
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 scrapy | |
| class HotDeals(scrapy.Spider): | |
| name = "hotdeals" | |
| def start_requests(self): | |
| urls = [ | |
| 'https://forums.redflagdeals.com/hot-deals-f9/' | |
| ] | |
| for url in urls: |
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
| # Stack ADT implementation using Lists | |
| # S.push(e) : Add element 'e' to the top of Stack S | |
| # S.pop() : Remove element from the top of Stack S and return the removed element, error if empty | |
| # S.top() : Return the reference of the top element of S without removing it, error if empty | |
| # S.isEmpty() : Return True if stack is empty | |
| # len(S) : Return number of elements in Stack S | |
| class EmptyStackException(Exception): | |
| pass |
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
| # Deque : Deque or Double-Ended Queue supports insertion or deletion at both front and rear | |
| # Deque ADT :- | |
| # D.add_first(e) : Add an element e to the front of Deque | |
| # D.add_last(e) : Add an element e to the rear of Deque | |
| # D.delete_first() : Remove and return the first element, error if empty | |
| # D.delete_last() : Remove and return the last element, error if empty | |
| # D.first() : Return the reference of the first element, error if empty | |
| # D.last() : Return the reference of the last element, error if empty | |
| # D.isEmpty() : Returns True if Deque is empty | |
| # D.size() : Returns the size of Deque |
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 unittest | |
| from queues import Queue, FullQueueException, EmptyQueueException | |
| class TestQueues(unittest.TestCase): | |
| def setUp(self): | |
| self.Q = Queue(N=5) | |
| def test_setup(self): | |
| "Test for Empty Queue" | |
| self.assertEqual(self.Q.size(),0) |
NewerOlder