-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathZEEL.java
More file actions
72 lines (72 loc) · 1.22 KB
/
ZEEL.java
File metadata and controls
72 lines (72 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* id, name
* 1, ram
* 2, shyam
* 3, ram
* 4, ram
* 5, laxman
*
* output
* 1, ram
* 2, shyam
* 5, laxman
*
* DELETE * FROM EMPLOYEE E WHERE E.ID IN (SELECT E1 FROM EMPLOYEE E1 LIMIT (SELECT COUNT(*) FROM EMPLOYEE E2 WHERE E2.NAME = 'ram' GROUP BY NAME))
*
* DELETE * FROM EMPLOYEE E1 JOIN EMPLOYEE E2 ON E1.NAME = E2.NAME WHERE E1.ID < E2.ID AND E1.NAME = E2.NAME;
*
*
* HashMap & HashSet <T>
* <Key, Value>
*
* 0
* [LinkedList, ]
*
*
*
*
* [9,10,20,100,200]
*
* max = 20;
* smax = 10;
*for(int i = 1 ; i< arr.length ; i++)
* if(ele > max) {
* smax = max;
* max = ele;
* }
* return (smax);
*
* O(n)
*
* class ds {
*
* List<T> values;
* int max;
* int smax;
* }
*
*
* class Node {
* int data;
* Node left;
* Node right;
* }
*
* class MaxHeap {
* Node root;
*
*
* void insert(Node child) {
* if(child.data > root.data) {
* // replace my root with the child to be insert & push down the root element to below
*
* } else {
*
* //Insert child node to the left Node.
* // I'll go to the right most node
* }
* }
* }
*
*
*/