This file contains 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 Driver; | |
import howard.edu.ood.hw2.collections.ArrayQueue; | |
public class Main_Queue { | |
public static void main(String args[]){ | |
ArrayQueue myqueue = new ArrayQueue(10); | |
//to enqueue elements onto the stack | |
for (int i = 0; i<20;i++){ |
This file contains 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
public class StackOperations{ | |
int mystack[]; | |
int global_size; | |
int counter = 0; | |
int newcounter = 0; | |
int extensionstack[]; | |
public StackOperations(int size){ | |
this.mystack = new int[size]; //create a stack of size as mentioned while creating object |
This file contains 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 <iostream> | |
#include <string> | |
#include <iomanip> | |
#include <fstream> | |
#include <vector> | |
using namespace std; | |
template<typename ItemType> | |
void Swap(ItemType& V1, ItemType& V2 ) | |
{ |
This file contains 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
def sumnums(arr,sum): | |
anslist = [] | |
dict = {} | |
for each in arr: | |
if each not in dict: | |
dict[each] = 1 | |
else: | |
dict[each] += 1 | |
print(dict) | |
for each in dict: |
NewerOlder