Solve one problem everyday.
All of my daily problem solving lives in this repo. Some of the wrong attempt is also here. If you follow this repo, make sure you run the code and try with test cases.
- Cracking the coding interview book
- https://www.geeksforgeeks.org/
- https://www.interviewbit.com/practice/
- https://start.interviewing.io/dashboard/interviewee
- https://leetcode.com/
- https://www.coursera.org/
- https://code.google.com/codejam/kickstart/
- https://www.pramp.com/dashboard
- https://www.youtube.com/channel/UCWSYAntBbdd2SLYUqPIxo0w
- https://www.byte-by-byte.com/
- https://www.dailycodingproblem.com/
- https://coderbyte.com/
- https://www.interviewcake.com
- https://www.geeksforgeeks.org/must-do-coding-questions-for-companies-like-amazon-microsoft-adobe/
- https://www.programcreek.com/2012/11/top-10-algorithms-for-coding-interview/
Tree:
- Segment Tree: https://www.youtube.com/watch?v=Oq2E2yGadnU
- AVL Tree: https://www.youtube.com/watch?v=-9sHvAnLN_w
1. https://www.igvita.com/2012/02/06/sstable-and-log-structured-storage-leveldb/
2. https://hackernoon.com/fundamentals-of-system-design-part-3-8da61773a631
Composition Function: http://www.deadcoderising.com/2015-09-07-java-8-functional-composition-using-compose-and-andthen/
String s="HelloWorld";
Map<Character, Long> map = t.chars() //converting int stream
.mapToObj(c -> (char) c)//int stream to character stream
.collect(Collectors.groupingBy(Function.identity(),// collect by group
Collectors.counting()));
System.out.println(map);
M=start+(end-start)/2;//overflow error free
int[] sorted = IntStream.of(inputArray)
.boxed()
.sorted(Comparator.reverseOrder())
.mapToInt(i -> i)
.toArray();
map.entrySet().stream().forEach(entry->{
System.out.println("Key: "+entry.getKey()+"value: "+entry.getValue());
});
String[] strings=new String[]{"hello","world","hello"};
List<String> list=Arrays.asList(strings);
Map<String, Long> map1= list.stream().collect(groupingBy(identity(), counting()));
private static class Inerval {
int start;
int end;
public Inerval(int start, int end) {
this.start = start;
this.end = end;
}
}
ArrayList<Inerval> list=new ArrayList<>();
list.add(new Inerval(1,3));
list.add(new Inerval(5,8));
list.add(new Inerval(4,10));
list.add(new Inerval(20,25));
list.sort(Comparator.comparingInt(v -> v.start));
list.stream().forEach(interval -> {
System.out.println(interval.start+"->"+interval.end);
});
PriorityQueue<ListNode> pq = new PriorityQueue<>(Comparator.comparing(node -> node.val));