Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * data structure - organizing data into a structure
- * functions - add delete transfer
- * search, print
- * If she asks to create a class stack, a class queue, as functions know the functions
- * Add delete search print sort
- * how can we identfiy the private data structure (under private keyword)
- * what is an array (size, pointer to first)
- * stack - last in first out,
- * queue - first in first out
- * know at least what is data strucutre (stucturing data within memory)
- * how to add/remove data structure, search data structure
- * how to solve/sort data structure
- * sorting is also one kind of question which can be built in
- * where can stack be used and what is it?
- * basic operations: push, pop, peek
- * applications: infix, postfix, reverse a string, implement two stacks inan array, check for balanced parenthesis
- * What is a queue and how is it implemented?
- * enqueue, dequeue, front, rear
- *
- * Exam 2:
- * p1 stack: 40
- * -convert infix to postfix conversion using stack (by hand not prog) (5 pts)
- * - evaluation of postfix expression (by hand not prog) (5 pts)
- * - write a function on a stack ( 10 pts) - Use the stack functions, but write function to do this with stack
- * - write a function on a stack(10 pts)
- * - what is the output (10 pts)
- * //unless it changes whole function, won't penalize for curly brackets (do not trust this)
- * //look at stuff on geeksforgeeks
- * //dont spend forever on it, its 10 points
- * //check the examples on url on access
- * //focus on stuff everybody can do, but you need to know logic - have a solid background in logic
- * //example: add two numbers from two stacks, decide where to put the result
- * //example: reverse queue, union of two queues
- * //for whats the output: every time you see cout, cout it, unless its about content of stacks
- *
- *
- * p2 queue: 40 //all queues: circular, priority
- * 1. what is the output of queue (10)//will be tricky, will give you queue, will play with remove/add, then give contents of queue
- * 2. whats inside the queue after running a code(10)
- * 3. write a function using queue(10)
- * 4. write a function using queue(10) //she doesn't seem to know if she will alter this question string to use abnormal functions
- * //direct function on queue: enque, deque, search, (have question on binary search, may change)
- * //may ask sorting, but not testing on sorting. Can use any sort.
- * //will not ask efficiency questions
- * //you can do linear search or binary search for sorts and stuff, dont need exactly insertion sort
- * //study insertion sort, she recommends
- * //probably linkedlists
- * //keep in mind as general: insertion sort, templates
- * //declare a queue, use head as front
- * //for example, write a function to print a queue
- * //if she gives you header, you have to use queue as template. in this case, since its not clear, you can do queue->front
- * //if you did queue.front, she would consider it right.
- * //if you write a function to get the front, which returns the first element, all correct
- * //try not to do a lot of lines
- * //queue is popular for interviews
- * //example questions: traversal ,reverse, etc. She is focusing on Questions not from class.
- * //difference between sorted and unsorted array, can stop with while if sorted
- * //otherwise forloop
- * //find smallest/largest in a (queue, stack, etc)
- * // heapsort is popular on interview question (??)
- * // linkedlist or arrays for stacks or queues,
- * //will send preassessment Sunday night
- * p3 recursion: 20 points
- *1 - implement function iteartively as recursion(5,5)
- * 2 - Like clicker quiz (5 points )(may be taken directly from clicker) (recursion in general, not stack or queue or stuff)
- * 3 - convert function interatively, recursively (5 points) (loop to recurs, other wy) (may involve queue/stack)
- * //easy question: how to print recusrively
- * //stack backwards, forward, queue back, forward
- * //search for number, traverse (print), if asked sorting do anything mainly insertion, templates
- * //data structure interview questions
- * //queue implementation using linked list
- * //ultimately if you have to traverse a queue as a linkedlist, you can. You have a pointer, rule says first end first out,
- * //try to write something to traverse
- * //try to find the next greater element in a queue
- * //previous and next in queue, sort it, 2nd from rear that kind of thing
- * //instead of taking n times, sort in decreasing order
- * //how do you approach it?
- * //can you find next greater in a stack
- * //sort it, put it in another array, only remove top at time
- * //don't panic, you can have your own idea
- * //respect definition of stack
- * //if you don't have to violate it, do it
- * aws: amazon web services, you create your website, queue for messages, queue for requests,
- * if you have a popular website, and he can't answer all of it, he has a timeline
- * if request is not answered in 4 days, drop message and answer other message
- * one queue, different type of messages, if message is informational, you don't have to do anything, then drop
- * if request, put it in another queue, goes to server, if this service is very long or doesn't have time after 4 days
- * circular queue, or put in another queue
- * if it takes more than a week, drop it completely and resubmit it
- * amazon web services
- * Amazon Simple Queue Service
- * exact order they are sent
- * create one queue, have timer for four days, type of message and message, and if informational, read and drop, if
- * request, executed. Highest priority versus long message are requests
- * Example: aws, one queue 2 types, message I, message R, assume every minute 3 messages,
- * After 4 hours, the untreated request enqueuer with highest priority
- * Mi, Mr, Mr, Mi, Mr, Mr, Mi,
- * At hour 4:
- * mr, mr, mi, mr, mr, mi (old queue), mr, mi, mi, mr
- * after 4 hours, if still in queue, we still get other request
- * remove them, put them at end of queue
- * after two hours, he finds out he never reached one of the big ones, he drops it completely, and asks user to resubmit
- *
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement