orangetime23
BAN USER- 0of 0 votes
Answersfind K Min Values in an array
- orangetime23 in United States| Report Duplicate | Flag | PURGE
Groupon Software Engineer / Developer Algorithm - 0of 0 votes
Answersfind the indexes of Min Values in an array
- orangetime23 in United States| Report Duplicate | Flag | PURGE
Groupon Software Engineer / Developer Algorithm - 0of 0 votes
Answersfind a Min Value in an array
- orangetime23 in United States| Report Duplicate | Flag | PURGE
Groupon Software Engineer / Developer Algorithm
The array is not sorted.
- orangetime23 June 30, 2013There might be duplicated min values, so not given, have to record all of them which match the requirement when traversing the array.
- orangetime23 June 30, 2013Random, Round-Robin
Shortest job first
FIFO
Multi-Level Feedback Queue (MLFQ)
Rotating Staircase Deadline Scheduler (RSDL)
Random, Round-Robin
Shortest job first
FIFO
Multi-Level Feedback Queue (MLFQ)
Rotating Staircase Deadline Scheduler (RSDL)
IPC means inter-process communication, which includes pipe, shared memory, shared files, sockets, signal.
- orangetime23 May 26, 2013if(buff[depth] == 0)
Do you mean
if(buff[depth] == NULL)
1. Context switch means change from one process to another process.
2. Process is private, threads share address space and file table, so they need synchronization primitives to ensure consistency.
One solution to prevent overflow: e.g. 2,147,483,647, record digits number d_num before operating last digit (num / 10 == 0), if d_num is 9, then compare with 214,748,364, if less than, do last digit; if equal, compare with 7; if larger than, throw exception.
- orangetime23 May 24, 2013Agree. On 32-bit machine, int range is –2,147,483,648 to 2,147,483,647. If use this number (–2,147,483,648 or 2,147,483,647), it will overflow.
- orangetime23 May 24, 2013'If this character is present in the HashMap and LNode is not NULL.' The repeated characters are not all in the tail, then searching them takes O(n), even though deletion takes O(1).
- orangetime23 May 21, 2013@cheming831, sorry, it will work, I misunderstood it.
- orangetime23 May 20, 2013
@eugene.yarovoi is right, the max heap is more efficient. I gave the solution with linked list and sort every time, the time complexity is O(nklog(k)).
- orangetime23 June 30, 2013