├── .gitbook
└── assets
│ ├── 49b8844f-cb50-46e0-baec-b338be6722b7 (1).jpeg
│ ├── 49b8844f-cb50-46e0-baec-b338be6722b7.jpeg
│ ├── cpp.json
│ ├── e4807743-db4a-4759-ad8c-b89b44b3cbee.jpeg
│ ├── image (1).png
│ ├── image (10).png
│ ├── image (100).png
│ ├── image (101).png
│ ├── image (102).png
│ ├── image (103) (1).png
│ ├── image (103).png
│ ├── image (104).png
│ ├── image (105).png
│ ├── image (106).png
│ ├── image (107).png
│ ├── image (108) (1).png
│ ├── image (108).png
│ ├── image (109).png
│ ├── image (11).png
│ ├── image (110).png
│ ├── image (111) (1).png
│ ├── image (111).png
│ ├── image (112) (1).png
│ ├── image (112).png
│ ├── image (113).png
│ ├── image (114).png
│ ├── image (115).png
│ ├── image (116).png
│ ├── image (117).png
│ ├── image (118).png
│ ├── image (119).png
│ ├── image (12).png
│ ├── image (120).png
│ ├── image (121).png
│ ├── image (122) (1).png
│ ├── image (122).png
│ ├── image (123).png
│ ├── image (124).png
│ ├── image (125).png
│ ├── image (126).png
│ ├── image (127).png
│ ├── image (128) (1).png
│ ├── image (128).png
│ ├── image (129).png
│ ├── image (13).png
│ ├── image (130).png
│ ├── image (131) (1).png
│ ├── image (131).png
│ ├── image (132).png
│ ├── image (133).png
│ ├── image (134).png
│ ├── image (135) (1).png
│ ├── image (135).png
│ ├── image (136).png
│ ├── image (137).png
│ ├── image (138).png
│ ├── image (139) (1).png
│ ├── image (139).png
│ ├── image (14).png
│ ├── image (140) (1).png
│ ├── image (140).png
│ ├── image (141).png
│ ├── image (142).png
│ ├── image (143).png
│ ├── image (144).png
│ ├── image (145).png
│ ├── image (146).png
│ ├── image (147).png
│ ├── image (148).png
│ ├── image (149).png
│ ├── image (15).png
│ ├── image (150).png
│ ├── image (151).png
│ ├── image (152).png
│ ├── image (153).png
│ ├── image (154).png
│ ├── image (155).png
│ ├── image (156).png
│ ├── image (157).png
│ ├── image (158).png
│ ├── image (159).png
│ ├── image (16).png
│ ├── image (160).png
│ ├── image (161).png
│ ├── image (162).png
│ ├── image (163).png
│ ├── image (164).png
│ ├── image (165).png
│ ├── image (166).png
│ ├── image (167).png
│ ├── image (168).png
│ ├── image (169).png
│ ├── image (17).png
│ ├── image (170).png
│ ├── image (171).png
│ ├── image (172).png
│ ├── image (173).png
│ ├── image (174).png
│ ├── image (175).png
│ ├── image (176).png
│ ├── image (177).png
│ ├── image (178).png
│ ├── image (179).png
│ ├── image (18).png
│ ├── image (180).png
│ ├── image (181).png
│ ├── image (182).png
│ ├── image (183).png
│ ├── image (184).png
│ ├── image (185).png
│ ├── image (186).png
│ ├── image (187).png
│ ├── image (188).png
│ ├── image (189).png
│ ├── image (19).png
│ ├── image (190).png
│ ├── image (191).png
│ ├── image (192).png
│ ├── image (193).png
│ ├── image (194).png
│ ├── image (195).png
│ ├── image (196).png
│ ├── image (197).png
│ ├── image (198).png
│ ├── image (199).png
│ ├── image (2).png
│ ├── image (20).png
│ ├── image (200).png
│ ├── image (201).png
│ ├── image (202).png
│ ├── image (203).png
│ ├── image (204).png
│ ├── image (205).png
│ ├── image (206).png
│ ├── image (207).png
│ ├── image (208).png
│ ├── image (209).png
│ ├── image (21).png
│ ├── image (210).png
│ ├── image (211).png
│ ├── image (212).png
│ ├── image (213).png
│ ├── image (214).png
│ ├── image (215).png
│ ├── image (216).png
│ ├── image (217).png
│ ├── image (218).png
│ ├── image (219).png
│ ├── image (22).png
│ ├── image (220).png
│ ├── image (221).png
│ ├── image (222).png
│ ├── image (223).png
│ ├── image (224).png
│ ├── image (225).png
│ ├── image (226).png
│ ├── image (227).png
│ ├── image (228).png
│ ├── image (229).png
│ ├── image (23).png
│ ├── image (230).png
│ ├── image (231).png
│ ├── image (232).png
│ ├── image (233).png
│ ├── image (234).png
│ ├── image (235).png
│ ├── image (236).png
│ ├── image (237).png
│ ├── image (238).png
│ ├── image (239).png
│ ├── image (24).png
│ ├── image (240).png
│ ├── image (241).png
│ ├── image (242).png
│ ├── image (243).png
│ ├── image (244).png
│ ├── image (245).png
│ ├── image (246).png
│ ├── image (247).png
│ ├── image (248).png
│ ├── image (249).png
│ ├── image (25).png
│ ├── image (250).png
│ ├── image (251).png
│ ├── image (252).png
│ ├── image (253).png
│ ├── image (254).png
│ ├── image (255).png
│ ├── image (256).png
│ ├── image (257).png
│ ├── image (258).png
│ ├── image (259).png
│ ├── image (26).png
│ ├── image (260).png
│ ├── image (261).png
│ ├── image (262).png
│ ├── image (263).png
│ ├── image (264).png
│ ├── image (265).png
│ ├── image (266).png
│ ├── image (267).png
│ ├── image (268).png
│ ├── image (269).png
│ ├── image (27).png
│ ├── image (270).png
│ ├── image (271).png
│ ├── image (272).png
│ ├── image (273).png
│ ├── image (274).png
│ ├── image (275).png
│ ├── image (276).png
│ ├── image (277).png
│ ├── image (278).png
│ ├── image (279).png
│ ├── image (28).png
│ ├── image (280).png
│ ├── image (281).png
│ ├── image (282).png
│ ├── image (283).png
│ ├── image (284).png
│ ├── image (285).png
│ ├── image (286).png
│ ├── image (287).png
│ ├── image (288).png
│ ├── image (289).png
│ ├── image (29).png
│ ├── image (290).png
│ ├── image (291).png
│ ├── image (292).png
│ ├── image (293).png
│ ├── image (294).png
│ ├── image (295).png
│ ├── image (296).png
│ ├── image (297).png
│ ├── image (298).png
│ ├── image (299).png
│ ├── image (3).png
│ ├── image (30).png
│ ├── image (300).png
│ ├── image (301).png
│ ├── image (302).png
│ ├── image (303).png
│ ├── image (304).png
│ ├── image (305).png
│ ├── image (306).png
│ ├── image (307).png
│ ├── image (308).png
│ ├── image (309).png
│ ├── image (31).png
│ ├── image (310).png
│ ├── image (311).png
│ ├── image (312).png
│ ├── image (313).png
│ ├── image (314).png
│ ├── image (315).png
│ ├── image (316).png
│ ├── image (317).png
│ ├── image (318).png
│ ├── image (32) (1).png
│ ├── image (32).png
│ ├── image (33).png
│ ├── image (34).png
│ ├── image (35).png
│ ├── image (36).png
│ ├── image (37).png
│ ├── image (38).png
│ ├── image (39).png
│ ├── image (4).png
│ ├── image (40).png
│ ├── image (41).png
│ ├── image (42).png
│ ├── image (43) (1).png
│ ├── image (43).png
│ ├── image (44).png
│ ├── image (45).png
│ ├── image (46).png
│ ├── image (47).png
│ ├── image (48).png
│ ├── image (49) (1).png
│ ├── image (49).png
│ ├── image (5).png
│ ├── image (50).png
│ ├── image (51).png
│ ├── image (52) (1).png
│ ├── image (52).png
│ ├── image (53).png
│ ├── image (54).png
│ ├── image (55) (1).png
│ ├── image (55).png
│ ├── image (56).png
│ ├── image (57) (1).png
│ ├── image (57).png
│ ├── image (58).png
│ ├── image (59).png
│ ├── image (6).png
│ ├── image (60) (1).png
│ ├── image (60).png
│ ├── image (61).png
│ ├── image (62).png
│ ├── image (63) (1).png
│ ├── image (63).png
│ ├── image (64).png
│ ├── image (65).png
│ ├── image (66) (1).png
│ ├── image (66).png
│ ├── image (67).png
│ ├── image (68).png
│ ├── image (69) (1).png
│ ├── image (69).png
│ ├── image (7).png
│ ├── image (70).png
│ ├── image (71).png
│ ├── image (72).png
│ ├── image (73).png
│ ├── image (74).png
│ ├── image (75) (1).png
│ ├── image (75).png
│ ├── image (76).png
│ ├── image (77).png
│ ├── image (78) (1).png
│ ├── image (78).png
│ ├── image (79).png
│ ├── image (8).png
│ ├── image (80) (1).png
│ ├── image (80).png
│ ├── image (81).png
│ ├── image (82).png
│ ├── image (83) (1).png
│ ├── image (83).png
│ ├── image (84).png
│ ├── image (85).png
│ ├── image (86).png
│ ├── image (87).png
│ ├── image (88).png
│ ├── image (89).png
│ ├── image (9).png
│ ├── image (90) (1).png
│ ├── image (90).png
│ ├── image (91).png
│ ├── image (92).png
│ ├── image (93).png
│ ├── image (94).png
│ ├── image (95).png
│ ├── image (96).png
│ ├── image (97).png
│ ├── image (98).png
│ ├── image (99) (1).png
│ ├── image (99).png
│ ├── image.png
│ ├── lcp.png
│ ├── suffixarray.png
│ └── suffixarray2.png
├── README.md
├── adhoc.md
├── bit-manipulation.md
├── dynamic-programming.md
├── game-theory.md
├── geometry.md
├── graph-theory.md
├── greedy.md
├── implementation-based.md
├── leetcode-categorized
├── Adobe - LeetCode.pdf
├── Amazon - LeetCode.pdf
├── Amazon-100.pdf
├── Amazon-1year - LeetCode.pdf
├── Amazon-2year - LeetCode.pdf
├── Apple - LeetCode.pdf
├── Apple-1year - LeetCode.pdf
├── Bloomberg - LeetCode.pdf
├── Facebook - 1year-LeetCode.pdf
├── Facebook - LeetCode.pdf
├── Facebook-100.pdf
├── Goldman Sachs - LeetCode.pdf
├── Google - LeetCode.pdf
├── Google-100.pdf
├── Google-1year- LeetCode.pdf
├── Google-2year - LeetCode.pdf
├── LinkedIn - LeetCode.pdf
├── Microsoft - LeetCode.pdf
├── Microsoft-1year - LeetCode.pdf
├── Microsoft-2year- LeetCode.pdf
├── Oracle - LeetCode.pdf
├── README.md
├── Snapchat - LeetCode.pdf
├── TopInterviewQuestions- LeetCode.pdf
├── TopQuestions LeetCode - Amazon.pdf
├── Twitter - LeetCode.pdf
├── Uber - LeetCode.pdf
├── Uber-1year-LeetCode.pdf
├── Walmart Labs - LeetCode.pdf
├── Yahoo - LeetCode.pdf
├── paradigm_wise
│ ├── Array - LeetCode.pdf
│ ├── Backtracking - LeetCode.pdf
│ ├── Binary Search - LeetCode.pdf
│ ├── Bit Manipulation - LeetCode.pdf
│ ├── Breadth-first Search - LeetCode.pdf
│ ├── Depth-first Search - LeetCode.pdf
│ ├── Divide and Conquer - LeetCode.pdf
│ ├── Dynamic Programming - LeetCode.pdf
│ ├── Graph - LeetCode.pdf
│ ├── Greedy - LeetCode.pdf
│ ├── Hash Table - LeetCode.pdf
│ ├── Math - LeetCode.pdf
│ ├── Stack - LeetCode.pdf
│ ├── String - LeetCode.pdf
│ ├── Tree - LeetCode.pdf
│ ├── Trie - LeetCode.pdf
│ ├── Two Pointers - LeetCode.pdf
│ └── Union Find - LeetCode.pdf
├── top-100-liked-questions.pdf
├── top-amazon-questions.pdf
├── top-facebook-questions.pdf
└── top-google-questions.pdf
├── linked-list.md
├── monotonic-structures.md
├── number-theory.md
├── problem-set
├── README.md
├── codeforces-training-set-i.md
├── cses-problem-set-ii.md
└── cses-problem-set.md
├── puzzles.md
├── range-queries.md
├── searching.md
├── semester
├── README.md
├── c++.md
├── database.md
├── dbms.md
├── javascript.md
├── oops.md
├── os.md
└── web-technologies.md
├── sorting.md
├── square-root-algorithms.md
├── string-algorithms.md
├── system-design.md
└── tips-and-tricks.md
/.gitbook/assets/49b8844f-cb50-46e0-baec-b338be6722b7 (1).jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/49b8844f-cb50-46e0-baec-b338be6722b7 (1).jpeg
--------------------------------------------------------------------------------
/.gitbook/assets/49b8844f-cb50-46e0-baec-b338be6722b7.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/49b8844f-cb50-46e0-baec-b338be6722b7.jpeg
--------------------------------------------------------------------------------
/.gitbook/assets/e4807743-db4a-4759-ad8c-b89b44b3cbee.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/e4807743-db4a-4759-ad8c-b89b44b3cbee.jpeg
--------------------------------------------------------------------------------
/.gitbook/assets/image (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (10).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (10).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (100).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (100).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (101).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (101).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (102).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (102).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (103) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (103) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (103).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (103).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (104).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (104).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (105).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (105).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (106).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (106).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (107).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (107).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (108) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (108) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (108).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (108).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (109).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (109).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (11).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (11).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (110).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (110).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (111) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (111) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (111).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (111).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (112) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (112) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (112).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (112).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (113).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (113).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (114).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (114).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (115).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (115).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (116).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (116).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (117).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (117).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (118).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (118).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (119).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (119).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (12).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (12).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (120).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (120).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (121).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (121).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (122) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (122) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (122).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (122).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (123).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (123).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (124).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (124).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (125).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (125).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (126).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (126).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (127).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (127).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (128) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (128) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (128).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (128).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (129).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (129).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (13).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (13).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (130).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (130).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (131) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (131) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (131).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (131).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (132).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (132).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (133).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (133).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (134).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (134).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (135) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (135) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (135).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (135).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (136).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (136).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (137).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (137).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (138).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (138).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (139) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (139) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (139).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (139).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (14).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (14).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (140) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (140) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (140).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (140).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (141).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (141).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (142).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (142).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (143).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (143).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (144).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (144).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (145).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (145).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (146).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (146).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (147).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (147).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (148).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (148).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (149).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (149).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (15).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (15).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (150).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (150).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (151).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (151).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (152).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (152).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (153).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (153).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (154).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (154).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (155).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (155).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (156).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (156).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (157).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (157).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (158).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (158).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (159).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (159).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (16).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (16).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (160).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (160).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (161).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (161).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (162).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (162).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (163).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (163).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (164).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (164).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (165).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (165).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (166).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (166).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (167).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (167).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (168).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (168).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (169).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (169).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (17).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (17).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (170).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (170).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (171).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (171).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (172).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (172).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (173).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (173).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (174).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (174).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (175).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (175).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (176).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (176).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (177).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (177).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (178).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (178).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (179).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (179).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (18).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (18).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (180).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (180).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (181).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (181).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (182).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (182).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (183).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (183).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (184).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (184).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (185).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (185).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (186).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (186).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (187).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (187).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (188).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (188).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (189).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (189).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (19).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (19).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (190).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (190).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (191).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (191).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (192).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (192).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (193).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (193).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (194).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (194).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (195).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (195).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (196).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (196).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (197).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (197).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (198).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (198).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (199).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (199).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (2).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (2).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (20).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (20).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (200).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (200).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (201).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (201).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (202).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (202).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (203).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (203).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (204).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (204).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (205).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (205).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (206).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (206).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (207).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (207).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (208).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (208).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (209).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (209).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (21).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (21).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (210).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (210).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (211).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (211).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (212).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (212).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (213).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (213).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (214).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (214).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (215).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (215).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (216).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (216).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (217).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (217).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (218).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (218).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (219).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (219).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (22).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (22).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (220).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (220).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (221).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (221).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (222).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (222).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (223).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (223).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (224).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (224).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (225).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (225).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (226).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (226).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (227).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (227).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (228).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (228).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (229).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (229).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (23).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (23).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (230).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (230).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (231).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (231).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (232).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (232).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (233).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (233).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (234).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (234).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (235).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (235).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (236).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (236).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (237).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (237).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (238).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (238).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (239).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (239).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (24).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (24).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (240).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (240).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (241).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (241).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (242).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (242).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (243).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (243).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (244).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (244).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (245).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (245).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (246).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (246).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (247).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (247).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (248).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (248).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (249).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (249).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (25).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (25).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (250).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (250).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (251).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (251).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (252).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (252).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (253).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (253).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (254).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (254).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (255).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (255).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (256).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (256).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (257).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (257).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (258).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (258).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (259).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (259).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (26).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (26).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (260).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (260).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (261).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (261).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (262).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (262).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (263).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (263).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (264).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (264).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (265).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (265).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (266).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (266).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (267).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (267).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (268).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (268).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (269).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (269).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (27).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (27).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (270).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (270).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (271).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (271).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (272).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (272).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (273).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (273).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (274).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (274).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (275).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (275).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (276).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (276).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (277).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (277).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (278).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (278).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (279).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (279).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (28).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (28).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (280).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (280).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (281).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (281).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (282).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (282).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (283).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (283).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (284).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (284).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (285).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (285).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (286).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (286).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (287).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (287).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (288).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (288).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (289).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (289).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (29).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (29).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (290).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (290).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (291).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (291).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (292).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (292).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (293).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (293).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (294).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (294).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (295).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (295).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (296).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (296).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (297).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (297).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (298).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (298).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (299).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (299).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (3).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (3).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (30).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (30).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (300).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (300).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (301).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (301).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (302).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (302).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (303).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (303).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (304).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (304).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (305).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (305).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (306).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (306).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (307).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (307).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (308).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (308).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (309).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (309).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (31).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (31).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (310).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (310).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (311).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (311).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (312).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (312).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (313).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (313).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (314).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (314).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (315).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (315).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (316).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (316).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (317).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (317).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (318).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (318).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (32) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (32) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (32).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (32).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (33).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (33).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (34).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (34).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (35).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (35).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (36).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (36).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (37).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (37).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (38).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (38).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (39).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (39).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (4).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (4).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (40).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (40).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (41).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (41).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (42).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (42).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (43) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (43) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (43).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (43).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (44).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (44).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (45).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (45).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (46).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (46).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (47).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (47).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (48).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (48).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (49) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (49) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (49).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (49).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (5).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (5).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (50).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (50).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (51).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (51).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (52) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (52) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (52).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (52).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (53).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (53).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (54).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (54).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (55) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (55) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (55).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (55).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (56).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (56).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (57) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (57) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (57).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (57).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (58).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (58).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (59).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (59).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (6).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (6).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (60) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (60) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (60).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (60).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (61).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (61).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (62).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (62).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (63) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (63) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (63).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (63).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (64).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (64).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (65).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (65).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (66) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (66) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (66).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (66).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (67).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (67).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (68).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (68).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (69) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (69) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (69).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (69).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (7).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (7).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (70).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (70).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (71).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (71).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (72).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (72).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (73).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (73).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (74).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (74).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (75) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (75) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (75).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (75).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (76).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (76).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (77).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (77).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (78) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (78) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (78).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (78).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (79).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (79).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (8).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (8).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (80) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (80) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (80).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (80).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (81).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (81).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (82).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (82).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (83) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (83) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (83).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (83).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (84).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (84).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (85).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (85).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (86).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (86).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (87).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (87).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (88).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (88).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (89).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (89).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (9).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (9).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (90) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (90) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (90).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (90).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (91).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (91).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (92).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (92).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (93).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (93).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (94).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (94).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (95).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (95).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (96).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (96).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (97).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (97).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (98).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (98).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (99) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (99) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (99).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image (99).png
--------------------------------------------------------------------------------
/.gitbook/assets/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/image.png
--------------------------------------------------------------------------------
/.gitbook/assets/lcp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/lcp.png
--------------------------------------------------------------------------------
/.gitbook/assets/suffixarray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/suffixarray.png
--------------------------------------------------------------------------------
/.gitbook/assets/suffixarray2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/.gitbook/assets/suffixarray2.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 | Hi, I'm Ankit Priyarup and this is my compiled coding notes comprising everything I've learned in my 4 years of B.Tech journey at Delhi Technological University as a Software Engineering Undergraduate. I hope this will come useful. Feel free to contribute to this repository, I'll happily accept any Pull Requests or issues.
3 |
4 | Follow me on Github to support my work, you can also leave me a tip here: http://paypal.me/ankitpriyarup
5 | Happy Learning!
6 |
--------------------------------------------------------------------------------
/bit-manipulation.md:
--------------------------------------------------------------------------------
1 | # Bit Manipulation
2 |
3 | * C++ type int is a 32-bit type, which means that every int number consists of 32 bits
4 | * Representation is indexed from right to left
5 | * The bit representation of a number is either signed or unsigned
6 | * **Least Significant Bit \(LSB\) & Most Significant Bit \(MSB\):** 99 in binary \(MSB part\)01100011\(LSB part\) so in MSB 01100011 in LSB 11000110 Endiness \(Storing data in memory\) : Little Endian \(LSB\), Big Endian \(MSB\)
7 | * 1's Complement: Toggling every bit ~
8 | * 2's Complement: -X = ~X + 1 X = ~\(-X-1\)
9 | * \_\_builtin\_clz\(x\): the number of zeros at the beginning of the number \(count leading zeroes\)
10 | * \_\_builtin\_ctz\(x\): the number of zeros at the end of the number \(count trailing zeroes\)
11 | * \_\_builtin\_popcount\(x\): the number of ones in the number
12 | * \(A+B\) = \(A^B\) + 2\(A&B\)
13 | > Above equation is full adder, A^B is ans and A&B is carry. Final ans is A^B + 2*(A&B) multiplying by 2 in order to shift bit by one
14 |
15 | ```cpp
16 | // Multiplication
17 | int mul(int a, int b)
18 | {
19 | int ans = 0;
20 | for (int i = 0 ; i < 32; ++i)
21 | {
22 | if (b & 1) ans += a;
23 | b = b>>1;
24 | a = a<<1;
25 | }
26 | return ans;
27 | }
28 |
29 | // Swap two numbers without extra space
30 | int x = 10, y = 5;
31 | x = x ^ y;
32 | y = x ^ y; //y = (x ^ y) ^ y = (y ^ y) ^ x = 0 ^ x = x
33 | x = x ^ y; //x = (x ^ y) ^ x = y
34 | ```
35 |
36 | > **Multiplication:**
37 | > i \* 8;
38 | > i << 3; \[8 = 2^3, so use 3\]
39 | >
40 | > **Division:**
41 | > i / 16;
42 | > i >> 4; \[16 = 2^4, so use 4\]
43 | >
44 | > **Modulo:**
45 | > i % 4;
46 | > i & 3; \[4 = 1 << 2, apply \(\(1 << 2\) - 1\), so use 3\]
47 | >
48 | > There are two shifts - logical shift & arithmetic shift. In right both are different for left both are same. Logical shift is normal. In arithmetic most significant signed bit is copied instead of zero. So a negative number remains negative.
49 |
50 | ### Repeating elements of array problem
51 |
52 | Given array \[1, 2, 4, 2, 1\] finding xor 1^2^4^2^1 = xor\(1^1\)^\(2^2\)^\(4\) = 0^0^4 = 4
53 |
54 | Given Array \[1, 1, 2, 2, 4, 5\] we need to find both 4 & 5
55 | If we simply xor all numbers we will get 4^5 which will definitely be non zero. \(100\)^\(101\)=\(001\) Now if we divide the array elements into two one having 1 at unit place other having 0. \[1, 1, 5\], \[2, 2, 4\] take xor of both to get the ans
56 | If 100\(4\) & 110\(6\) are non repeating numbers we need to divide the array based on tense \(check rightmost set bit pos\) place set or unset
57 |
58 | ```cpp
59 | int arr[] = {1, 1, 2, 2, 3, 9};
60 | int n = sizeof(arr) / sizeof(int);
61 | int xors = 0;
62 | for (int i = 0; i < n; ++i) xors ^= arr[i];
63 |
64 | int temp = 0;
65 | while(xors > 0)
66 | {
67 | if (xors&1) break;
68 | ++temp;
69 | xors >>= 1;
70 | }
71 | int mask = 1<>temp)&1) num1 ^= arr[i];
77 | else num2 ^= arr[i];
78 | }
79 | cout << num1 << " " << num2 << endl;
80 | ```
81 |
82 | Given array \[7, 7, 3, 4, 2, 4, 3, 3, 4, 7\] all numbers except one is occurring thrice we need to find that number.
83 | add binary position values \(111 + 111 + 011 + 100 + 010 + 100 + 011 + 011 + 100 + 111\) = 676 %3 all digit = 010 = 0.20 + 1.21 + 0.22 = 2
84 |
85 | ```cpp
86 | int arr[] = {7, 11, 3, 4, 9, 4, 3, 3, 4, 7, 9, 9, 7};
87 | int n = sizeof(arr) / sizeof(int);
88 |
89 | int count[32] {};
90 | for (int i = 0; i < n; ++i)
91 | {
92 | int cur = arr[i], pos = 0;
93 | while (cur > 0)
94 | {
95 | if (cur&1) ++count[pos];
96 | ++pos;
97 | cur >>= 1;
98 | }
99 | }
100 | int ans = 0;
101 | for (int i = 0; i < 32; ++i) ans += pow(2, i) * (count[i] % 3);
102 | cout << ans << endl;
103 | ```
104 |
105 | ### Calculating number of set bits
106 |
107 | ```cpp
108 | int countBits(int n)
109 | {
110 | //Time: O(number of bits)
111 | int count = 0;
112 | while (n > 0)
113 | {
114 | count += (n&1);
115 | n = n>>1;
116 | }
117 | return count;
118 |
119 | //Time: O(number of set bits)
120 | int count = 0;
121 | while(n)
122 | {
123 | ++count;
124 | n = n&(n-1);
125 | }
126 |
127 | // __builtin_popcount(n); or __builtin_popcountl or __builtin_popcountll
128 | }
129 | ```
130 |
131 | ### Get Set Clear ith bit
132 |
133 | ```cpp
134 | int getIthBit(int n, int i)
135 | {
136 | return (n&(1<> (end - start + 1)) its 00111111
209 | and both of them we will get mask 00111000
210 |
211 | But you know what this is bullshit XD a way easier solution is create an
212 | array of this struct
213 | */
214 | struct myStruct
215 | {
216 | int x : (3 * 8);
217 | // This will automatically reserve continuous 24 bits or 3 bytes
218 | };
219 | ```
220 |
221 | ### Insertion
222 |
223 | You are given two 32-bit numbers N, M and two bit positions i and j. Write a method to insert M into N such that M starts at bit j and ends at bit i. You can assume that the bits j through i have enough space to fit all of M. That is if M = 10011, you can assume that there are at least 5 bits between j and i. You would not , for example, have j = 3 and i = 2, because M could not fully fit between bit 3 and bit 2.
224 |
225 | Example: N = 10000000000, M = 10011, i = 2, j = 6
226 | Output: 10001001100
227 |
228 | ```text
229 | Create a mask like this 1111100000111111 then and it with n
230 | then shift m i bits <<
231 | Then n | m will be ans
232 | ```
233 |
234 | ### Binary to String
235 |
236 | Given a real number between 0 and 1 \(e.g. 0.72\) that is passed in as a double, print the binary representation. If the number cannot be represented accurately in binary with at most 32 characters, print 'ERROR'
237 |
238 | ```cpp
239 | /* Say given 0.875 = 1*(2^-1) + 0*(2^-2) + 1*(2^-3)
240 | So in binary it becomes 0.101*/
241 | void printBinaryFloat(double num)
242 | {
243 | assert(num >= 0 && num <= 1);
244 | string res = "0.";
245 | while (num)
246 | {
247 | if (res.size() > 32) { cout << "ERROR!\n"; return; }
248 | double x = num*2;
249 | if (x >= 1) { res += '1'; num = r - 1; }
250 | else { res += '0'; num = r; }
251 | }
252 | cout << res << '\n';
253 | }
254 | ```
255 |
256 | ### Flip Bit to Win
257 |
258 | You have an integer and you can flip exactly one bit from a 0 to 1. Write code to find the length of longest sequence of 1s you could create.
259 |
260 | Input: 1775 \(11011101111\)
261 | Output: 8
262 |
263 | ```cpp
264 | /* Easy solution is we create a prefSum from both side. Then iterate
265 | bitstring if 0 comes we will basically try to flip it and max
266 | there will be prefL[i-1] + 1 + prefR[i+1] */
267 |
268 | /* Better approach is create (ex testacse):
269 | [0, 4, 1, 3, 1, 2, 21] this array it starts for 0 (right to left
270 | in binary) we have 0 zeroes then 4 ones then 1 zero then 3 ones
271 | then 1 zero then 2 ones. */
272 |
273 | int longestSeq(int n)
274 | {
275 | vector seq;
276 | bool onesTurn = false;
277 | int cnt = 0;
278 | while (n)
279 | {
280 | if (onesTurn ^ (n&1))
281 | {
282 | seq.push_back(cnt);
283 | onesTurn = !onesTurn;
284 | cnt = 1;
285 | }
286 | else cnt++;
287 | n >>= 1;
288 | }
289 | if (cnt) seq.push_back(cnt);
290 | seq.push_back(32 - accumulate(seq.begin(), seq.end(), 0));
291 |
292 | int res = 0;
293 | for (int i = 0; i < seq.size(); i += 2)
294 | {
295 | if (seq[i] == 1)
296 | {
297 | int cur = 1;
298 | if (i-1 >= 0) cur += seq[i-1];
299 | if (i+1 < seq.size()) cur += seq[i+1];
300 | res = max(res, cur);
301 | }
302 | }
303 | return res;
304 | }
305 |
306 | /* We can reduce O(N) space to O(1) idea is we only need 3 states
307 | so do both task in one iteration while mainting only 3 states. */
308 | ```
309 |
310 | ### Closest smaller and greater numbers with same number of set bits
311 |
312 | Given a positive integer, print the next smallest and the next largest number that have the same number of 1 bits in their binary representation.
313 |
314 | ```cpp
315 | /* Next number: Find rightmost unset bit, and set it
316 | Prev number: Find rightmost set bit, unset it and set all before
317 |
318 | but we have to also maintain set bits count, so if we flip a set to
319 | unset to compensate we must do vice versa to some other bit.
320 |
321 | (Next Greater)
322 | > Flip right most non-trailing zero
323 | eg: 11011001111100
324 | 11011011111100
325 | > Clear bits to the right
326 | 11011010000000
327 | > Maintain set bit cnt from right size
328 | 11011010001111
329 |
330 | (Prev Smaller)
331 | > Flip right most non-trailing one
332 | eg: 10011110000011
333 | 10011100000011
334 | > Clear bits to the right
335 | 10011100000000
336 | > maintain count from left of chosen point (in step 1)
337 | 10011101110000 */
338 |
339 | // More optimized approach (TODO explanation)
340 | void getNext(int x)
341 | {
342 | int cntZeroes = 0, cntOnes = 0, cur = x;
343 | while (cur && !(cur&1)) // cnts no of trailing zeroes
344 | cntZeroes++, cur >>= 1;
345 | while (cur&1) // cnts immediate one set block
346 | cntOnes++, cur >>= 1;
347 |
348 | if (cntZeroes+cntOnes == (8*sizeof(x)-1) || cntZeroes+cntOnes == 0)
349 | return -1;
350 |
351 | return (x + (1<>= 1;
357 | if (cur == 0) return -1;
358 | while (cur && !(cur&1)) cntZeroes++, cur >>= 1;
359 |
360 | return (x - (1< 1010 1010 1010 1010 1010 1010 1010 1010
398 | // 0x55555555 in bin -> 0101 0101 0101 0101 0101 0101 0101 0101
399 | }
400 | ```
401 |
402 | ### Draw Line
403 |
404 | A monochrome screen is stored as a single array of bytes, allowing eight consecutive pixels to be stored in one byte. The screen has width w, where w is divisible by 8 \(that is, no byte will be split across rows\). The height of the screen, of course, can be derived from the length of the array and the width. Implement a function that draws a horizontal line from \(x1, y\) \(x2, y\).
405 | The method signature should look something like:
406 | `drawLine(byte[] screen, int width, int x1, int x2, int y)`
407 |
408 | ```cpp
409 | /* Naive way is iterate (x1, x2) in yth row and set the pixel
410 | we can optimize it by setting entire 8 bytes 0xFF if the gap is
411 | large. */
412 |
413 | void drawLine(byte[] screen, int width, int x1, int x2, int y)
414 | {
415 | int startOffset = x1%8, firstFullByte = x1/8;
416 | if (startOffset != 0) firstFullByte++;
417 | int endOffset = x2%8, lastFullByte = x2/8;
418 | if (endOffset != 0) endFullByte++;
419 |
420 | for (int i = firstFullByte; i <= lastFullByte; ++i)
421 | screen[(width/8)*y + i] = (byte)0xFF;
422 |
423 | byte startMask = (byte)(0xFF >> startOffset);
424 | byte endMask = (byte)~(0xFF >> endOffset);
425 |
426 | if (x1/8 == x2/8) // x1 and x2 are same byte
427 | screen[(width/8)*y + (x1/8)] |= (byte)(startMask & endMask);
428 | else
429 | {
430 | if (startOffset != 0)
431 | screen[(width/8)*y + firstFullByte - 1] |= startMask;
432 | if (endOffset != 7)
433 | screen[(width/8)*y + lastFullByte + 1] |= endMask;
434 | }
435 | }
436 | ```
437 |
438 | ### [Bitwise AND of numbers in range](https://leetcode.com/problems/bitwise-and-of-numbers-range/)
439 |
440 | ```cpp
441 | int rangeBitwiseAnd(int m, int n)
442 | {
443 | int res = 0;
444 | for (int i = 31; i >= 0; --i)
445 | {
446 | bool p = (m>>i)&1, q = (n>>i)&1;
447 | if (!p && !q) continue;
448 | if (p && q) res += (1< Line;
18 | typedef vector Polygon;
19 | struct Plane { double a, b, c, d; }; // ax + by + cz = d form
20 | double crossProduct(const Vector &a, const Vector &b) { return a.x * b.y - a.y * b.x; }
21 | double dotProduct(const Vector &a, const Vector &b) { return a.x * b.x + a.y * b.y; }
22 | double sqrDist(Point p, Point q) { return dotProduct(p-q, p-q); }
23 |
24 | // internal used functions
25 | vector< pair > vec;
26 | double length(const Vector &a) { return sqrt(dotProduct(a, a)); }
27 | inline int dcmp(double x) { return (x > 1e-10) - (x < -(1e-10)); }
28 | inline void add(double x, double flag) { vec.push_back(make_pair(x, -flag)); }
29 | double get(Point &p, Vector &v, Point &q, Vector &w) { return crossProduct(w, p-q) / crossProduct(v, w); }
30 | void getSegmentIntersection(Point p, Vector v, Point q, Vector w)
31 | {
32 | if (!dcmp(crossProduct(v, w)))
33 | {
34 | if (!dcmp(crossProduct(v, q-p)))
35 | {
36 | double l = dotProduct(v, q-p) / dotProduct(v, v);
37 | double r = dotProduct(v, q+w-p) / dotProduct(v, v);
38 | if (l > r) swap(l, r);
39 | add(l, +1); add(r, -1);
40 | }
41 | }
42 | else
43 | {
44 | static int num = 0;
45 | double temp = get(q, w, p, v);
46 | if (dcmp(temp) >= 0 && dcmp(temp-1) <= 0)
47 | {
48 | double rate = 1;
49 | if (dcmp(temp) == 0 || dcmp(temp-1) == 0) rate = .5;
50 | temp = get(p, v, q, w);
51 | add(temp, dcmp(crossProduct(w, v)) > 0 ? +rate : -rate);
52 | }
53 | }
54 | }
55 |
56 | // Helper functions
57 | Point rotateCounterClockwise(Point pt, double radians) { return Point(pt.x*cos(radians) - pt.y*sin(radians), pt.x*sin(radians) + pt.y*cos(radians)); }
58 | Point rotateCounterClockwise(Point pt, double radians, Point ref) { return rotateCounterClockwise(pt-ref, radians)+ref; }
59 | Point rotateClockwise(Point pt, double radians) { return rotateCounterClockwise(pt, -radians); }
60 | Point rotateClockwise(Point pt, double radians, Point ref) { return rotateCounterClockwise(pt, -radians, ref); }
61 | double pointPlaneDistance(Point a, Plane b) { return fabs(b.a*a.x + b.b*a.y + b.c*a.z - b.d) / sqrt(b.a*b.a + b.b*b.b + b.c*b.c); }
62 | Point projectPointOnLine(Line a, Point b) { return a.F + (a.S-a.F) * dotProduct(b-a.F, a.S-a.F)/dotProduct(a.S-a.F, a.S-a.F); }
63 | Point projectPointOnLineSegment(Line a, Point b)
64 | {
65 | double r = dotProduct(a.S-a.F, a.S-a.F);
66 | if (fabs(r) < EPS) return a.F;
67 | r = dotProduct(b-a.F, a.S-a.F)/r;
68 | if (r < 0) return a.F;
69 | if (r > 1) return a.S;
70 | return a.F + (a.S-a.F)*r;
71 | }
72 | bool linesParalle(Line a, Line b) { return (fabs(crossProduct(a.S-a.F, b.F-b.S)) < EPS); }
73 | bool linesCollinear(Line a, Line b) { return (linesParalle(a, b) && (fabs(crossProduct(a.F-b.F, b.S-a.S)) < EPS)); }
74 | bool linesIntersect(Line a, Line b)
75 | {
76 | if ((crossProduct(b.S-a.F, a.S-a.F) * crossProduct(b.F-a.F, a.S-a.F)) > 0) return false;
77 | if ((crossProduct(a.F-b.F, b.S-b.F) * crossProduct(a.S-b.F, b.S-b.F)) > 0) return false;
78 | return true;
79 | }
80 | Point computeLineIntersection(Line a, Line b)
81 | {
82 | a.S = a.S-a.F; b.S = b.F-b.S; b.F = b.F-a.F;
83 | if (dotProduct(a.S, a.S) < EPS) return a.F;
84 | if (dotProduct(b.S, b.S) < EPS) return b.F;
85 | return a.F + a.S*crossProduct(b.F, b.S)/crossProduct(a.S, b.S);
86 | }
87 | // Point in possibly non-convex polygon, returns 1 for strictly interior points,
88 | // 0 for strictly exterior points, and 0 or 1 for the remaining points
89 | bool pointInPolygon(const Polygon &poly, Point pt)
90 | {
91 | bool res = false;
92 | for (int i = 0; i < poly.size(); ++i)
93 | {
94 | int j = (i+1) % poly.size();
95 | if ((poly[i].y <= pt.y && pt.y < poly[j].y || poly[j].y <= pt.x && pt.y < poly[i].y) &&
96 | pt.x < poly[i].x + (poly[j].x - poly[i].x)*(pt.y - poly[i].y)/(poly[j].y - poly[i].y))
97 | res = !res;
98 | }
99 | return res;
100 | }
101 | bool pointOnPolygon(const Polygon &poly, Point pt)
102 | {
103 | for (int i = 0; i < poly.size(); ++i)
104 | {
105 | Line ln(poly[i], poly[(i+1)%poly.size()]);
106 | if (sqrDist(projectPointOnLineSegment(ln, pt), pt) < EPS)
107 | return true;
108 | }
109 | return false;
110 | }
111 | vector circleLineIntersection(Line line, Point center, double radius)
112 | {
113 | vector res;
114 | Point d = line.S-line.F;
115 | double D = crossProduct(line.F-center, line.S-center);
116 | double e = sqrt(radius*radius*dotProduct(d, d) - D*D);
117 | res.push_back (center + Point(D*d.y+(d.y >= 0 ? 1 : -1)*d.x*e, -D*d.x+fabs(d.y)*e) / dotProduct(d,d));
118 | if (e > 0) res.push_back (center + Point(D*d.y-(d.y >= 0 ? 1 : -1)*d.x*e,-D*d.x-fabs(d.y)*e) / dotProduct(d,d));
119 | return res;
120 | }
121 | vector intersectionPointBetweenTwoCircles(Point a, Point b, double r, double R)
122 | {
123 | vector ret;
124 | double d = sqrt(sqrDist(a,b));
125 | if (d > r+R || d+min(r,R) < max(r,R)) return ret;
126 | double x = (d*d-R*R+r*r)/(2*d);
127 | double y = sqrt(r*r-x*x);
128 | Point v = (b-a)/d;
129 | ret.push_back (a+v*x + rotateCounterClockwise(v, M_PI/2)*y);
130 | if (y > 0) ret.push_back (a+v*x - rotateCounterClockwise(v, M_PI/2)*y);
131 | return ret;
132 | }
133 | double areaBetweenTwoCircles(Point a, Point b, double r, double R)
134 | {
135 | double n = sqrt((a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y));
136 | if (n >= r+R) return 0;
137 | else if (n+r <= R || n+R <= r) return (M_PI * min(r, R) * min(r, R));
138 | else
139 | {
140 | double a = acos((R*R + n*n - r*r) / (2*R*n)) * 2;
141 | double b = acos((r*r + n*n - R*R) / (2*r*n)) * 2;
142 | return ((R*R*a + r*r*b - R*R*sin(a) - r*r*sin(b)) * 0.5);
143 | }
144 | }
145 | // assuming that the coordinates are listed in a clockwise or counterclockwise order
146 | double polygonSignedArea(Polygon poly)
147 | {
148 | double area = 0;
149 | for (int i = 0; i < poly.size(); ++i)
150 | {
151 | int j = (i+1) % poly.size();
152 | area += poly[i].x*poly[j].y - poly[j].x*poly[i].y;
153 | }
154 | return area / 2.0;
155 | }
156 | double polygonArea(Polygon poly) { return fabs(polygonSignedArea(poly)); }
157 | pair polygonCentroid(Polygon poly)
158 | {
159 | double cx = 0, cy = 0;
160 | double scale = 6.0 * polygonSignedArea(poly);
161 | for (int i = 0; i < poly.size(); ++i)
162 | {
163 | int j = (i+1) % poly.size();
164 | cx += (poly[i].x+poly[j].x) * (poly[i].x*poly[j].y - poly[j].x*poly[i].y);
165 | cy += (poly[i].y+poly[j].y) * (poly[i].x*poly[j].y - poly[j].x*poly[i].y);
166 | }
167 | return {cx/scale, cy/scale};
168 | }
169 | /* Given a n side polygon (Not necessarily convex) and m lines, it finds section length
170 | in nmlogn time. If the line fully lies inside the polygon it's that lines length, its
171 | length that lies inside polygon. */
172 | vector polygonLineIntersection(Polygon poly, vector lines)
173 | {
174 | int n = poly.size(), m = lines.size(), x = 0;
175 | poly.push_back(poly[0]);
176 | vector ans(m, 0);
177 | for (auto &line : lines)
178 | {
179 | Point a = line.first, b = line.second;
180 | vec.clear();
181 | for (int i = 0; i < n; ++i)
182 | getSegmentIntersection(a, b-a, poly[i], poly[i+1] - poly[i]);
183 | sort(all(vec));
184 | double k = 0;
185 | for (size_t i = 0; i < vec.size(); ++i)
186 | {
187 | k += vec[i].second;
188 | if (dcmp(k)) ans[x] += vec[i+1].first - vec[i].first;
189 | }
190 | ans[x++] *= length(b-a);
191 | }
192 | return ans;
193 | }
194 | ```
195 |
196 | ```c++
197 | // Rectangles Overlap/Intersection
198 | bool isRectangleOverlap(vector& rec1, vector& rec2)
199 | {
200 | int x1 = rec1[0], y1 = rec1[1], x2 = rec1[2], y2 = rec1[3];
201 | int x3 = rec2[0], y3 = rec2[1], x4 = rec2[2], y4 = rec2[3];
202 | // using pos
203 | return !(x2 <= x3 || y2 <= y3 || x1 >= x4 || y1 >= y4);
204 | // using area
205 | return (min(x2, x4) > max(x3, x1)) && (min(y2, y4) > max(y3, y1));
206 | }
207 | // Circle and Rectangle Overlap/Intersection
208 | bool checkOverlap(int radius, int x_center, int y_center, int x1, int y1, int x2, int y2)
209 | {
210 | int rectX = x1, rectY = y1, rectWidth = abs(x2-x1), rectHeight = abs(y2-y1);
211 | // (These max terms are closest x and y points to circle from rectangle
212 | int deltaX = x_center - max(rectX, min(x_center, rectX + rectWidth));
213 | int deltaY = y_center - max(rectY, min(y_center, rectY + rectHeight));
214 | return (deltaX*deltaX + deltaY*deltaY) <= (radius*radius);
215 | }
216 | ```
217 |
218 | ### [Check Straight Line](https://leetcode.com/problems/check-if-it-is-a-straight-line/)
219 | ```c++
220 | // Check slope of continuous segments
221 | bool checkStraightLine(vector>& coordinates)
222 | {
223 | int p = (coordinates[1][1] - coordinates[0][1]);
224 | int q = (coordinates[1][0] - coordinates[0][0]);
225 | for (int i = 2; i < coordinates.size(); ++i)
226 | {
227 | int r = (coordinates[i][1] - coordinates[i-1][1]);
228 | int s = (coordinates[i][0] - coordinates[i-1][0]);
229 | if (p * s != r * q) return false;
230 | }
231 | return true;
232 | }
233 |
234 | // Check three points there triangle area must be zero using heron's formula
235 | https://leetcode.com/problems/check-if-it-is-a-straight-line/discuss/408968/Check-collinearity
236 | ```
237 |
--------------------------------------------------------------------------------
/leetcode-categorized/Adobe - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Adobe - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Amazon - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Amazon - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Amazon-100.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Amazon-100.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Amazon-1year - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Amazon-1year - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Amazon-2year - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Amazon-2year - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Apple - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Apple - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Apple-1year - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Apple-1year - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Bloomberg - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Bloomberg - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Facebook - 1year-LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Facebook - 1year-LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Facebook - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Facebook - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Facebook-100.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Facebook-100.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Goldman Sachs - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Goldman Sachs - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Google - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Google - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Google-100.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Google-100.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Google-1year- LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Google-1year- LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Google-2year - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Google-2year - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/LinkedIn - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/LinkedIn - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Microsoft - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Microsoft - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Microsoft-1year - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Microsoft-1year - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Microsoft-2year- LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Microsoft-2year- LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Oracle - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Oracle - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/README.md:
--------------------------------------------------------------------------------
1 | # Leetcode-Questions
2 | Leetcode question list by companies, include the premium questions.
3 |
4 | Last updated- 2nd December 2019
5 |
6 |
7 | # Curated List of Top 75 LeetCode Questions
8 |
9 |
10 | ## Array
11 |
12 | - [ ] [Two Sum](https://leetcode.com/problems/two-sum/)
13 | - [ ] [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)
14 | - [ ] [Contains Duplicate](https://leetcode.com/problems/contains-duplicate/)
15 | - [ ] [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/)
16 | - [ ] [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/)
17 | - [ ] [Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/)
18 | - [ ] [Find Minimum in Rotated Sorted Array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/)
19 | - [ ] [Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/)
20 | - [ ] [3Sum](https://leetcode.com/problems/3sum/)
21 | - [ ] [Container With Most Water](https://leetcode.com/problems/container-with-most-water/)
22 |
23 | ---
24 |
25 | ## Binary
26 |
27 | - [ ] [Sum of Two Integers](https://leetcode.com/problems/sum-of-two-integers/)
28 | - [ ] [Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/)
29 | - [ ] [Counting Bits](https://leetcode.com/problems/counting-bits/)
30 | - [ ] [Missing Number](https://leetcode.com/problems/missing-number/)
31 | - [ ] [Reverse Bits](https://leetcode.com/problems/reverse-bits/)
32 |
33 | ---
34 |
35 | ## Dynamic Programming
36 |
37 | - [ ] [Climbing Stairs](https://leetcode.com/problems/climbingstairs/)
38 | - [ ] [Coin Change](https://leetcode.com/problems/coinchange/)
39 | - [ ] [Longest Increasing Subsequence](https://leetcode.com/problems/longestincreasingsubsequence/)
40 | - [ ] [Longest Common Subsequence]()
41 | - [ ] [Word Break Problem](https://leetcode.com/problems/wordbreak/)
42 | - [ ] [Combination Sum](https://leetcode.com/problems/combinationsumiv/)
43 | - [ ] [House Robber](https://leetcode.com/problems/houserobber/)
44 | - [ ] [House Robber II](https://leetcode.com/problems/houserobberii/)
45 | - [ ] [Decode Ways](https://leetcode.com/problems/decodeways/)
46 | - [ ] [Unique Paths](https://leetcode.com/problems/uniquepaths/)
47 | - [ ] [Jump Game](https://leetcode.com/problems/jumpgame/)
48 |
49 | ---
50 |
51 | ## Graph
52 |
53 | - [ ] [Clone Graph](https://leetcode.com/problems/clonegraph/)
54 | - [ ] [Course Schedule](https://leetcode.com/problems/courseschedule/)
55 | - [ ] [Pacific Atlantic Water Flow](https://leetcode.com/problems/pacificatlanticwaterflow/)
56 | - [ ] [Number of Islands](https://leetcode.com/problems/numberofislands/)
57 | - [ ] [Longest Consecutive Sequence](https://leetcode.com/problems/longestconsecutivesequence/)
58 | - [ ] [Alien Dictionary (Leetcode Premium)](https://leetcode.com/problems/aliendictionary/)
59 | - [ ] [Graph Valid Tree (Leetcode Premium)](https://leetcode.com/problems/graphvalidtree/)
60 | - [ ] [Number of Connected Components in an Undirected Graph (Leetcode Premium)](https://leetcode.com/problems/numberofconnectedcomponentsinanundirectedgraph/)
61 | ---
62 |
63 | ## Interval
64 |
65 | - [ ] [Insert Interval](https://leetcode.com/problems/insertinterval/)
66 | - [ ] [Merge Intervals](https://leetcode.com/problems/mergeintervals/)
67 | - [ ] [Non-overlapping Intervals](https://leetcode.com/problems/nonoverlappingintervals/)
68 | - [ ] [Meeting Rooms (Leetcode Premium)](https://leetcode.com/problems/meetingrooms/)
69 | - [ ] [Meeting Rooms II (Leetcode Premium)](https://leetcode.com/problems/meetingroomsii/)
70 |
71 | ---
72 |
73 | ## Linked List
74 |
75 | - [ ] [Reverse a Linked List](https://leetcode.com/problems/reverselinkedlist/)
76 | - [ ] [Detect Cycle in a Linked List](https://leetcode.com/problems/linkedlistcycle/)
77 | - [ ] [Merge Two Sorted Lists](https://leetcode.com/problems/mergetwosortedlists/)
78 | - [ ] [Merge K Sorted Lists](https://leetcode.com/problems/mergeksortedlists/)
79 | - [ ] [Remove Nth Node From End Of List](https://leetcode.com/problems/removenthnodefromendoflist/)
80 | - [ ] [Reorder List](https://leetcode.com/problems/reorderlist/)
81 |
82 | ---
83 |
84 | ## Matrix
85 |
86 | - [ ] [Set Matrix Zeroes](https://leetcode.com/problems/setmatrixzeroes/)
87 | - [ ] [Spiral Matrix](https://leetcode.com/problems/spiralmatrix/)
88 | - [ ] [Rotate Image](https://leetcode.com/problems/rotateimage/)
89 | - [ ] [Word Search](https://leetcode.com/problems/wordsearch/)
90 |
91 | ---
92 |
93 | ## String
94 |
95 | - [ ] [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longestsubstringwithoutrepeatingcharacters/)
96 | - [ ] [Longest Repeating Character Replacement](https://leetcode.com/problems/longestrepeatingcharacterreplacement/)
97 | - [ ] [Minimum Window Substring](https://leetcode.com/problems/minimumwindowsubstring/)
98 | - [ ] [Valid Anagram](https://leetcode.com/problems/validanagram/)
99 | - [ ] [Group Anagrams](https://leetcode.com/problems/groupanagrams/)
100 | - [ ] [Valid Parentheses](https://leetcode.com/problems/validparentheses/)
101 | - [ ] [Valid Palindrome](https://leetcode.com/problems/validpalindrome/)
102 | - [ ] [Longest Palindromic Substring](https://leetcode.com/problems/longestpalindromicsubstring/)
103 | - [ ] [Palindromic Substrings](https://leetcode.com/problems/palindromicsubstrings/)
104 | - [ ] [Encode and Decode Strings (Leetcode Premium)](https://leetcode.com/problems/encodeanddecodestrings/)
105 |
106 | ---
107 |
108 | ## Tree
109 |
110 | - [ ] [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximumdepthofbinarytree/)
111 | - [ ] [Same Tree](https://leetcode.com/problems/sametree/)
112 | - [ ] [Invert/Flip Binary Tree](https://leetcode.com/problems/invertbinarytree/)
113 | - [ ] [Binary Tree Maximum Path Sum](https://leetcode.com/problems/binarytreemaximumpathsum/)
114 | - [ ] [Binary Tree Level Order Traversal](https://leetcode.com/problems/binarytreelevelordertraversal/)
115 | - [ ] [Serialize and Deserialize Binary Tree](https://leetcode.com/problems/serializeanddeserializebinarytree/)
116 | - [ ] [Subtree of Another Tree](https://leetcode.com/problems/subtreeofanothertree/)
117 | - [ ] [Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/constructbinarytreefrompreorderandinordertraversal/)
118 | - [ ] [Validate Binary Search Tree](https://leetcode.com/problems/validatebinarysearchtree/)
119 | - [ ] [Kth Smallest Element in a BST](https://leetcode.com/problems/kthsmallestelementinabst/)
120 | - [ ] [Lowest Common Ancestor of BST](https://leetcode.com/problems/lowestcommonancestorofabinarysearchtree/)
121 | - [ ] [Implement Trie (Prefix Tree)](https://leetcode.com/problems/implementtrieprefixtree/)
122 | - [ ] [Add and Search Word](https://leetcode.com/problems/addandsearchworddatastructuredesign/)
123 | - [ ] [Word Search II](https://leetcode.com/problems/wordsearchii/)
124 |
125 | ---
126 |
127 | ## Heap
128 |
129 | - [ ] [Merge K Sorted Lists](https://leetcode.com/problems/mergeksortedlists/)
130 | - [ ] [Top K Frequent Elements](https://leetcode.com/problems/topkfrequentelements/)
131 | - [ ] [Find Median from Data Stream](https://leetcode.com/problems/findmedianfromdatastream/)
132 |
133 |
--------------------------------------------------------------------------------
/leetcode-categorized/Snapchat - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Snapchat - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/TopInterviewQuestions- LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/TopInterviewQuestions- LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/TopQuestions LeetCode - Amazon.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/TopQuestions LeetCode - Amazon.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Twitter - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Twitter - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Uber - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Uber - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Uber-1year-LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Uber-1year-LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Walmart Labs - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Walmart Labs - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/Yahoo - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/Yahoo - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Array - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Array - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Backtracking - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Backtracking - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Binary Search - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Binary Search - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Bit Manipulation - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Bit Manipulation - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Breadth-first Search - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Breadth-first Search - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Depth-first Search - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Depth-first Search - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Divide and Conquer - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Divide and Conquer - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Dynamic Programming - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Dynamic Programming - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Graph - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Graph - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Greedy - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Greedy - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Hash Table - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Hash Table - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Math - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Math - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Stack - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Stack - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/String - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/String - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Tree - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Tree - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Trie - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Trie - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Two Pointers - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Two Pointers - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/paradigm_wise/Union Find - LeetCode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/paradigm_wise/Union Find - LeetCode.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/top-100-liked-questions.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/top-100-liked-questions.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/top-amazon-questions.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/top-amazon-questions.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/top-facebook-questions.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/top-facebook-questions.pdf
--------------------------------------------------------------------------------
/leetcode-categorized/top-google-questions.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nistha-tech/Coding_Notes/1c3c06008e899a1a22a72a667cec6aae9b02b5d0/leetcode-categorized/top-google-questions.pdf
--------------------------------------------------------------------------------
/problem-set/README.md:
--------------------------------------------------------------------------------
1 | # Problem Set
2 |
3 |
--------------------------------------------------------------------------------
/problem-set/cses-problem-set-ii.md:
--------------------------------------------------------------------------------
1 | # CSES Problem Set - II
2 |
3 | ## Range Queries
4 |
5 | ### [Range Sum Queries I](https://cses.fi/problemset/task/1646/)
6 |
7 | ```cpp
8 | signed main()
9 | {
10 | ios_base::sync_with_stdio(false); cin.tie(NULL);
11 | int n, q; cin >> n >> q;
12 | vec<1, int> arr(n+1);
13 | for (int i = 1; i <= n; ++i) { cin >> arr[i]; arr[i] += arr[i-1]; }
14 | while (q--)
15 | {
16 | int l, r; cin >> l >> r;
17 | cout << arr[r] - arr[l-1] << '\n';
18 | }
19 | return 0;
20 | }
21 | ```
22 |
23 | ### [Range Minimum Queries I](https://cses.fi/problemset/task/1647/)
24 |
25 | ```cpp
26 | const int MAXN = 2e5+5;
27 | vec<2, int> sparseTable(MAXN, 40, -1);
28 | signed main()
29 | {
30 | ios_base::sync_with_stdio(false); cin.tie(NULL);
31 | int n, q; cin >> n >> q;
32 | int k = log2(n);
33 | for (int i = 0; i < n; ++i) cin >> sparseTable[i][0];
34 | for (int j = 1; j <= k; j++)
35 | for (int i = 0; i + (1 << j) <= n; i++)
36 | sparseTable[i][j] = min(sparseTable[i][j-1], sparseTable[i + (1 << (j-1))][j-1]);
37 | while (q--)
38 | {
39 | int L, R; cin >> L >> R;
40 | L--, R--;
41 | int j = log2(R-L+1);
42 | cout << min(sparseTable[L][j], sparseTable[R - (1<> n >> q;
77 | for (int i = 1; i <= n; ++i) { int x; cin >> x; update(i, x); }
78 | while (q--)
79 | {
80 | int a, b, c; cin >> a >> b >> c;
81 | if (a == 1)
82 | {
83 | int prev = query(b, b);
84 | update(b, c-prev);
85 | }
86 | else cout << query(b, c) << '\n';
87 | }
88 | return 0;
89 | }
90 | ```
91 |
92 | ### [Range Minimum Queries II](https://cses.fi/problemset/task/1649/)
93 |
94 | ```cpp
95 | const int MAXN = 1e6;
96 | int segTree[2*MAXN], _n_;
97 | void build(int n)
98 | {
99 | _n_ = n;
100 | for (int i = _n_-1; i > 0; --i)
101 | segTree[i] = min(segTree[i<<1], segTree[i<<1|1]);
102 | }
103 | void update(int p, int val)
104 | {
105 | for (segTree[p += _n_] = val; p > 1; p >>= 1)
106 | segTree[p>>1] = min(segTree[p], segTree[p^1]);
107 | }
108 | int query(int l, int r) // Interval [l, r)
109 | {
110 | int res = (1LL<<61);
111 | for (l += _n_, r += _n_; l < r; l >>= 1, r >>= 1)
112 | {
113 | if (l&1) res = min(res, segTree[l++]);
114 | if (r&1) res = min(res, segTree[--r]);
115 | }
116 | return res;
117 | }
118 |
119 | signed main()
120 | {
121 | ios_base::sync_with_stdio(false); cin.tie(NULL);
122 | int n, q; cin >> n >> q;
123 | for (int i = 0; i < n; ++i) cin >> segTree[n+i];
124 | build(n);
125 | while (q--)
126 | {
127 | int a, b, c; cin >> a >> b >> c;
128 | if (a == 1) update(b-1, c);
129 | else cout << query(b-1, c) << '\n';
130 | }
131 | return 0;
132 | }
133 | ```
134 |
135 | ### [Range Xor Queries](https://cses.fi/problemset/task/1650/)
136 |
137 | ```cpp
138 | signed main()
139 | {
140 | ios_base::sync_with_stdio(false); cin.tie(NULL);
141 | int n, q; cin >> n >> q;
142 | vec<1, int> arr(n+1, 0); // prefix xors
143 | for (int i = 1; i <= n; ++i) { cin >> arr[i]; arr[i] ^= arr[i-1]; }
144 | while (q--)
145 | {
146 | int l, r; cin >> l >> r;
147 | cout << (arr[r]^arr[l-1]) << '\n';
148 | }
149 | return 0;
150 | }
151 | ```
152 |
153 | ### [Range Update Queries](https://cses.fi/problemset/task/1651/)
154 |
155 | ```cpp
156 | const int N = 2e5 + 5;
157 | vector BIT1(N), BIT2(N);
158 | void update(vector &BIT, int i, int val)
159 | {
160 | while (i <= N)
161 | {
162 | BIT[i] += val;
163 | i += (i & -i);
164 | }
165 | }
166 | int query(vector &BIT, int i)
167 | {
168 | int sm = 0;
169 | while (i)
170 | {
171 | sm += BIT[i];
172 | i -= (i & -i);
173 | }
174 | return sm;
175 | }
176 | int summation(int x) { return ((query(BIT1, x)*x) - query(BIT2, x)); } // sum of [1, x]
177 | int queryRange(int l, int r) { return summation(r) - summation(l-1); } // query [l, r]
178 | void updateRange(int l, int r, int val) // update [l, r]
179 | {
180 | update(BIT1, l, val); update(BIT1, r+1, -val);
181 | update(BIT2, l, val*(l-1)); update(BIT2, r+1, -val*r);
182 | }
183 |
184 | signed main()
185 | {
186 | ios_base::sync_with_stdio(false); cin.tie(NULL);
187 | int n, q; cin >> n >> q;
188 | for (int i = 1; i <= n; ++i) { int x; cin >> x; updateRange(i, i, x); }
189 | while (q--)
190 | {
191 | int t; cin >> t;
192 | if (t == 1)
193 | {
194 | int a, b, u; cin >> a >> b >> u;
195 | updateRange(a, b, u);
196 | }
197 | else
198 | {
199 | int a; cin >> a;
200 | cout << queryRange(a, a) << '\n';
201 | }
202 | }
203 | return 0;
204 | }
205 | ```
206 |
207 |
208 |
209 |
--------------------------------------------------------------------------------
/puzzles.md:
--------------------------------------------------------------------------------
1 | # Puzzles
2 |
3 | ### The Heavy Pill
4 |
5 | You have 20 bottles of pills, 19 bottles have 1.0 gram pills, but one has pills of weight 1.1 grams. Given a scale that provides an exact measurement, how would you find the heavy bottle? You can only use the scale once.
6 |
7 | ```text
8 | Pick 1 pill from bottle 1, 2 from bottle 2, 3 from bottle 3 and so on
9 | total weight would be: (1 + 2 + 3 + ... + 20) + 0.1(k)
10 | so, (weight - 210)/0.1 will tell which bottle has heavy pill
11 | ```
12 |
13 | ### Backetball
14 |
15 | You have a basketball hoop and someone says that you can play one of two games.
16 | Game 1: You get one shot to make the hoop
17 | Game 2: You get three shots and you have to make two of three shots
18 | If p is the probability of making a particular shot, for which values of p should you pick one game or the other?
19 |
20 | ```text
21 | Prob of game 1: p
22 | Prob of game 2:
23 | [Making exactly 2 shots] [Making exactly 3 shots]
24 | 3C2 * p^2 * (1-p) p^3
25 | 3(1-p)p^2
26 | = 3p^2 - 2p^3
27 |
28 | p > 3p^2 - p^3
29 | 1 > 3p - p^2
30 | (2p - 1)(p - 1) > 0
31 | So we should play Game 1 if 0 < p < 0.5 and Game 2 if 0.5 < p < 1
32 | ```
33 |
34 | ### Dominos
35 |
36 | There is an 8x8 chessboard in which two diagonally opposite corners have been cur off. You are given 31 dominos, and single domino can cover exactly two squares. Can you use the 31 dominos to cover the entire board? Prove your answer \(by providing an example or showing why its impossible\).
37 |
38 | ```text
39 | We removed diagonal opposite corners which have same colors. On placing domino
40 | each different color is covered. so 62 tiles are left out of 30 are white and
41 | 30 are black but there are 2 left overs of same color which we can never cover.
42 | ```
43 |
44 | ### Ants on a Triangle
45 |
46 | There are three ants on different vertices of a triangle. What is the probability of collision \(between any two or all of them\) if they start walking on the sides of the triangle? Assume that each ant randomly picks a direction, with either direction being equally likely to be chosen, and that they walk at the same speed. Similarly find the probability of collision with n ants on a n-vertex polygon.
47 |
48 | ```text
49 | P(colliding) = 1 - P(Not Colliding)
50 | Ants will not collide if they all either move clockwise or counter clockwise
51 | P(Not colliding) = (1/2)^n + (1/2)^n = (1/2)^(n-1)
52 | ```
53 |
54 | ### Jugs of Water
55 |
56 | You have a five-quart jug, a three-quart jug, and an unlimited supply of water \(but no measuring cups\). How would you come up with exactly four quarts of water? Note that the jugs are oddly shaped, such that filling up exactly "half" of the jug would be impossible.
57 |
58 | ```text
59 | Remeber we can make 5-3 quarts easily, fill 5q jug then empty it to 3q jug you
60 | will be left with 2.
61 | Transfer 2quart from jug1 to 2. Now again pour all 5q to jug1. And again pour
62 | from jug1 to 2. This time 1 additional will go and we are left with 4 in jug1
63 | and 3 in jug2.
64 |
65 | If jugs sizes are relatively prime, we can measure any value between 1 and sum
66 | of jug sizes. It can be represented as a linear diaphotine equation:
67 | ax + by = c
68 | where a and b are size of jugs we have and c is amount that we form
69 | The theory of Diophantine equations states you can create an amount c iff
70 | it is a multiple of the gcd of a and b which is 1 (since they are
71 | relative prime)
72 | ```
73 |
74 | ### Blue-Eyes Island
75 |
76 | A bunch of people are living on an island, when a visitor comes with a strange order: all blue eyed people must leave the island as soon as possible. There will be a flight out at 8 pm every evening. Each person can see everyone else's eye color, but they do not know their own \(nor is anyone allowed to tell them\). Additionally they do not know how many people have blue eyes, although they do know that at least one person does. How many days will it take the blue-eyed person to leave?
77 |
78 | ```text
79 | Assume there are n people in island and b have b eyes
80 |
81 | Case b = 1: (exactly 1 person has blue eyes)
82 | Everyone knows, atleast 1 has blue eyes and special person will see no one else
83 | having blue eyes so he will assume he has so he will leave that evening.
84 |
85 | Case b = 2: (exactly 2 persons have blue eyes)
86 | Two special people see each other, but are unsure whether b is 1 or 2. So they
87 | do nothing next day if they meet again means that b is not 1 since if it was
88 | then the person would have left. so b = 2. Which means he himself has blue eyes
89 |
90 | Case b > 2: (General case)
91 | Say if b = k then those k people will immediately know that there are either k
92 | or k-1 people with blue eyes. If there were k-1 then those would have left on
93 | second night. So it follows dp relation. For b blue eyes it will take b nights.
94 | ```
95 |
96 | ### The Apocalypse
97 |
98 | In the new post-apocalyptic world, the world queen is desperately concerned about the birth rate. Therefore, she decrees that all families should ensure that they have one girl or else they face massive fines. If all families abide by this policy - that is, they have continue to have children until they have one girl, at which point they immediately stop - what will be the gender ratio of the new generation be? \(Assume that the odds of someone having a boy or girl on any given pregnancy is equal\)
99 |
100 | ```text
101 | G -> 1/2
102 | BG -> 1/4
103 | BBG -> 1/8
104 | Infinite GP sum giving 1. This would mean that gender ratio is even
105 | Families on an avg contribute exactly 1 boy and 1 girl.
106 |
107 | It's wrong to think that way. Biology hasn't been changed. Half
108 | of newborn babies are boys and girls abiding by some rule about
109 | when to stop having children doesn't change this fact.
110 |
111 | Concatenate all house hold data G - BBG - BBBBG on a whole it seems
112 | just as probable as new born baby prob.
113 |
114 | Therefore gender ratio is 50-50
115 |
116 | We can simulate this on C++, for larger values it should give 0.5
117 | probability
118 | ```
119 |
120 | ### 100 Lockers
121 |
122 | There are 100 closed lockers in a hallway. A man begins by opening all 100 lockers. Next, he closes every second locker. Then, on his third pass, he toggles every third locker. This process continues for 100 passes, such that one pass i, the man toggles every ith locker. After his 100th pass in the hallway, in which he toggles only locker \#100, how much lockers are open.
123 |
124 | ```text
125 | For door 100 its:
126 | 1 - on
127 | 2 - off
128 | 3 - off
129 | 4 - on
130 | It will toggle for every factor
131 | cnt_of_factors&1 == 1 means door is open
132 |
133 | cnt_of_factors is odd when x(100) is a perfect square)
134 |
135 | so there are 1, 4, 9, 16, 25, 36, 49, 64, 81, 100
136 | 10 perfect square so 10 lockers will be open in the end
137 | ```
138 |
139 | ### Poison
140 |
141 | You have 1000 bottles of wine, and one them is poisoned. To test you let rats drink it. Minimize number of rats.
142 |
143 | ```text
144 | Way 1 (999 Rats) drink one of bottle, if out of those one dies means
145 | that bottle was poisoned, if no one dies means 100th bottle which
146 | wasn't tested was poisoned
147 |
148 | Way 2 (32 rats) Divide search space by say half so we need 500 rats
149 | each will taste 2 wines. If a kth rat dies means 2*k or 2*k+1 could
150 | be that bottle so we will need additional to check those 2 bottles
151 | so we need 1 rat, making 501
152 | Generalising it:
153 | -> require 1000/k + (k-1) rats
154 |
155 | Let's find out minima of above function:
156 | yk = 1000 + k^2 - k ....(i)
157 | differentiate both sides and put dy/dk = 0
158 | we will get k = (1+y)/2 ....(ii)
159 | put this in eq i and solving quadratic equation:
160 | y^2 + 2y - 3999 = 0 we get y = 62.246 putting in ii we get
161 | k = 32 (take integer ignore fraction)
162 | so we need 32 rats
163 |
164 | Way 3 (log2(1000) rats) Why 32 in above? Let's denote each wine in
165 | binary:
166 | 00001 -> feed to 1st rat
167 | 00010 -> feed to 2nd rat
168 | 00011 -> feed to 1st and 2nd rat
169 | 00100 -> feed to 3rd rat
170 | 00101 -> feed to 1st and 3rd rat
171 | 00110 -> feed to 2nd and 3rd rat
172 | 00111 -> feed to 1st, 2nd and 3rd rat
173 |
174 | If a wine x is poisned then all it's set bit rats must be dead
175 | ```
176 |
177 |
--------------------------------------------------------------------------------
/range-queries.md:
--------------------------------------------------------------------------------
1 | # Range Queries
2 |
3 | ## Prefix Sum
4 | [https://leetcode.com/problems/range-sum-query-2d-immutable/](https://leetcode.com/problems/range-sum-query-2d-immutable/)
5 | ```c++
6 | class NumMatrix {
7 | public:
8 | vector> dp;
9 | NumMatrix(vector>& matrix)
10 | {
11 | if (matrix.empty()) return;
12 | int n = matrix.size(), m = matrix[0].size();
13 | dp = vector>(n+1, vector(m+1, 0));
14 | for (int i = 0; i < n; ++i)
15 | for (int j = 0; j < m; ++j)
16 | dp[i+1][j+1] = matrix[i][j] + dp[i][j+1] + dp[i+1][j] - dp[i][j];
17 | }
18 |
19 | int sumRegion(int row1, int col1, int row2, int col2)
20 | {
21 | return dp[row2+1][col2+1] - dp[row1][col2+1] - dp[row2+1][col1] + dp[row1][col1];
22 | }
23 | };
24 | ```
25 |
26 |
27 | ## Prefix XOR
28 |
29 | ## Difference Array
30 |
31 | ## Sparse Table
32 |
33 | Every positive integer can easily be represented as a sum of powers of 2 given by its decimal representation. Similarly, any interval \[l, r\] can be broken down into smaller intervals of powers of 2.
34 |
35 | 
36 |
37 | Now imagine if we could precompute the range query answer for all those intervals and combine them. Precompute answers for all intervals of size 2^x
38 |
39 | It can query in logarithmic time but for overlap friendly functions i.e. f\(f\(a, b\), f\(b, c\)\) = f\(a, f\(b, c\)\) it can do it in constant time.
40 |
41 | 
42 |
43 | **Building:** dp\[i\]\[j\] = min of array from i to i + 2^j. j goes from 0 till floor\(log2\(n\)\)
44 |
45 | 
46 |
47 | 
48 |
49 | 
50 |
51 | ```cpp
52 | int st[MAXN][K + 1];
53 | // Build O(NlogN): here f is function of operation like sum or min
54 | for (int i = 0; i < N; i++) st[i][0] = f(array[i]);
55 | for (int j = 1; j <= K; j++)
56 | for (int i = 0; i + (1 << j) <= N; i++)
57 | st[i][j] = f(st[i][j-1], st[i + (1 << (j - 1))][j - 1]);
58 |
59 | // Sum query: O(logN)
60 | int sm = 0;
61 | for (int j = p; j >= 0; --j)
62 | if ((1 << j) <= R-L+1) { sm += st[L][j]; L += (1<= l; --i) sparseTable[lvl][i] = func(sparseTable[lvl][i+1], arr[i])%p;
86 | if (m+1 < r)
87 | {
88 | sparseTable[lvl][m+1] = arr[m+1]%p;
89 | for (int i = m+2; i < r; ++i) sparseTable[lvl][i] = func(sparseTable[lvl][i-1], arr[i])%p;
90 | }
91 | if (l+1 != r) { build(lvl+1, l, m); build(lvl+1, m, r); }
92 | }
93 | int query(int L, int R)
94 | {
95 | if (L == R) return arr[L]%p;
96 | int k = __builtin_clz(L^R) ^ 31;
97 | int lvl = maxLvl - 1 - k;
98 | int res = sparseTable[lvl][L];
99 | if (R & ((1<> n;
108 | for (int i = 0; i < n; ++i) cin >> arr[i];
109 | INIT;
110 | build();
111 | int q; cin >> q;
112 | while (q--)
113 | {
114 | int l, r; cin >> l >> r;
115 | bug(l, r);
116 | cout << query(l, r) << '\n';
117 | }
118 | return 0;
119 | }
120 | ```
121 |
122 | ## Fenwick Tree
123 |
124 | It is used to calculate prefix sum of an array. It's not as powerful as Segment Tree but it's simpler to implement.
125 | In the image, BIT will be stored in array of n+1 length. \(indexing starts with 1 because binary operation used later on will be anomoly for 0\) for each say 3 find 3 & -3 this will flip right most set bit giving the parent from tree.
126 | Now to fill all value say 4 we find 4 = 0 + 2^2 means we go from 0th index to next 4 elements or for 11 = 2^3 + 2^1 + 2^0 from 10-10 
127 | If we need to find sum from 0 to 5 we first go to value 6 take it here it's 9 then we go to it's parent it's 10 so ans is 19
128 |
129 | 
130 |
131 | ```cpp
132 | void update(int BIT[], int n, int i, int incr)
133 | {
134 | while (i <= n)
135 | {
136 | BIT[i] += incr;
137 | i += (i & -i);
138 | }
139 | }
140 | int query(int BIT[], int n, int i)
141 | {
142 | int ans = 0;
143 | while (i > 0)
144 | {
145 | ans += BIT[i];
146 | i -= (i & -i);
147 | }
148 | return ans;
149 | }
150 | ```
151 |
152 | ### Binary Search in BIT
153 |
154 | Given a data of heights: \[1, 8\] \[2, 2\] \[3, 10\] \[4, 100\] \[5, 1\] \[6, 2\] Basically 8 peoples are of height 1, 2 of height 2, 10 of height 3 and so on. We can query to determine the kth tallest person. Or we can update number of people count for a particular height.
155 |
156 | 
157 |
158 | Approach \#1: For query we can apply binary search, so check middle height say 3 then find it's count using fenwick tree and so on. It will be O\(nlogn\)
159 |
160 | Approach \#2: Given below is how the fenwick tree will look like. Start off with the highest bit on which is 16 then check middle which can be find by right shifting again check refer diagram. O\(logn\)
161 |
162 | 
163 |
164 | ### Above the Median
165 |
166 | Given an array representing height of ith member. We need find count of possible subarrays such that there median \(a\[ceil\(n/2\)\]\) is greater than or equal to x.
167 |
168 | Example: \[10, 5, 6, 2\] x = 6
169 | Answer is: 7 => {10}, {6}, {10, 5}, {5, 6}, {6, 2}, {10, 5, 6}, {10, 5, 6, 2}.
170 |
171 | We can replace element in arr with 1 if it's >= x and -1 if it's less
172 | \[1, -1, 1, -1\]
173 | Now our problem is reduced to finding subarrays with non-negative sum.
174 | Calculate prefix sum
175 | \[1, 0, 1, 0\]
176 | Now we basically want to find L & R such that p\[R\] - p\[L\] is >= 0 this simply reduces down to inversion count problem.
177 |
178 | ### Read Single Element
179 |
180 | * Simply do BIT\[i\] - BIT\[i-1\] but it will be 2logn Time
181 | * Maintain an array storing actual elements as well N space
182 | * Third way is based on the fact that when we do BIT\[i\] - BIT\[i-1\] both i and i-1 will eventually converge at a point which may be zero
183 |
184 | ```cpp
185 | int readSingle(int i)
186 | {
187 | int sum = BIT[i];
188 | if (i > 0)
189 | {
190 | int z = i - (i & -i);
191 | i--;
192 | while (i != z) sum -= BIT[i], i -= (i & -i);
193 | }
194 | return sum;
195 | }
196 | ```
197 |
198 | ### Find index with given cumulative frequency
199 |
200 | Naive way is to iterate keep having cumulativeFreq in logN and check linearly which will be Nlogn. In case of negative frequencies that's the only way. In non-negative scenario we can use binary search modification making it just logN.
201 |
202 | ```cpp
203 | int find(int cumFreq, int n)
204 | {
205 | int i = 0;
206 | int bitMask = (int)(pow(2, (int)(log2(n))));
207 | while (bitMask)
208 | {
209 | int temp = i + bitMask;
210 | bitMask >>= 1;
211 | if (temp > n) continue;
212 | if (cumFreq == BIT[temp]) return temp;
213 | else if (cumFreq > BIT[temp]) i = temp, cumFreq -= BIT[temp];
214 | }
215 | if (cumFreq != 0) return -1;
216 | else return i;
217 | }
218 | ```
219 |
220 | ### 2D BIT
221 |
222 | Say you have a plane with dots \(with non-negative coordinates\) There are three queries.
223 |
224 | * Set a dot at \(x, y\)
225 | * Remove the dot from \(x, y\)
226 | * Count the number of dots in rectangle \(0, 0\) \(x, y\) - \(down-left and top-right corner\)
227 |
228 | ```cpp
229 | void update(int x, int y, int val)
230 | {
231 | while (x <= MAX_X)
232 | {
233 | int _y = y;
234 | while (_y <= MAX_Y)
235 | BIT[x][_y] += val, _y += (_y & -_y);
236 | x += (x & -x);
237 | }
238 | }
239 | void query(int x, int y)
240 | {
241 | int sum = 0;
242 | while (x)
243 | {
244 | int _y = y;
245 | while (_y)
246 | sum += BIT[x][_y], _y -= (_y & -_y);
247 | x -= (x & -x);
248 | }
249 | return sum;
250 | }
251 | ```
252 |
253 | ### Range Update & Range Query
254 |
255 | ```cpp
256 | const int N = 1005;
257 | vector BIT1(N), BIT2(N);
258 | void update(vector &BIT, int i, int val)
259 | {
260 | while (i <= N)
261 | {
262 | BIT[i] += val;
263 | i += (i & -i);
264 | }
265 | }
266 | int query(vector &BIT, int i)
267 | {
268 | int sm = 0;
269 | while (i)
270 | {
271 | sm += BIT[i];
272 | i -= (i & -i);
273 | }
274 | return sm;
275 | }
276 | int summation(int x) { return ((query(BIT1, x)*x) - query(BIT2, x)); } // sum of [1, x]
277 | int queryRange(int l, int r) { return summation(r) - summation(l-1); } // query [l, r]
278 | void updateRange(int l, int r, int val) // update [l, r]
279 | {
280 | update(BIT1, l, val); update(BIT1, r+1, -val);
281 | update(BIT2, l, val*(l-1)); update(BIT2, r+1, -val*r);
282 | }
283 | ```
284 |
285 | ## Wavelet Trees
286 |
287 | ```cpp
288 | #undef int
289 | const int MAXN = 3e5 + 10;
290 | const int MX = 1e6;
291 | int arr[MAXN];
292 | struct wavelet_tree
293 | {
294 | private:
295 | int lo, hi;
296 | wavelet_tree *l, *r;
297 | vec<1, int> b;
298 |
299 | public:
300 | wavelet_tree(int *from, int *to, int x, int y)
301 | {
302 | lo = x, hi = y;
303 | if (lo == hi || from >= to) return;
304 | int mid = (lo + hi)/2;
305 | auto f = [mid](int x){ return x <= mid; };
306 | b.reserve(to - from + 1); b.push_back(0);
307 | for (auto it = from; it != to; it++) b.push_back(b.back() + f(*it));
308 | auto pivot = stable_partition(from, to, f);
309 | l = new wavelet_tree(from, pivot, lo, mid);
310 | r = new wavelet_tree(pivot, to, mid+1, hi);
311 | }
312 |
313 | ~wavelet_tree()
314 | {
315 | delete l;
316 | delete r;
317 | }
318 |
319 | int kthSmallest(int l, int r, int k) // [l, r]
320 | {
321 | if (l > r) return 0;
322 | if (lo == hi) return lo;
323 | int inLeft = b[r] - b[l-1], lb = b[l-1], rb = b[r];
324 | if (k <= inLeft) return this->l->kthSmallest(lb+1, rb, k);
325 | return this->r->kthSmallest(l-lb, r-rb, k-inLeft);
326 | }
327 |
328 | int lessThanEqualToK(int l, int r, int k) // [l, r]
329 | {
330 | if (l > r or k < lo) return 0;
331 | if (hi <= k) return r - l + 1;
332 | int lb = b[l-1], rb = b[r];
333 | return this->l->lessThanEqualToK(lb+1, rb, k) + this->r->lessThanEqualToK(l-lb, r-rb, k);
334 | }
335 |
336 | int equalToK(int l, int r, int k) // [l, r]
337 | {
338 | if (l > r or k < lo or k > hi) return 0;
339 | if (lo == hi) return r - l + 1;
340 | int lb = b[l-1], rb = b[r], mid = (lo+hi)/2;
341 | if (k <= mid) return this->l->equalToK(lb+1, rb, k);
342 | return this->r->equalToK(l-lb, r-rb, k);
343 | }
344 | };
345 | /*
346 | // CODE
347 | int n; cin >> n;
348 | for (int i = 1; i <= n; ++i) cin >> arr[i];
349 | wavelet_tree T(arr+1, arr+n+1, 1, MX);
350 | int q; cin >> q;
351 | while (q--)
352 | {
353 | int t, l, r, k; cin >> t >> l >> r >> k;
354 | if (t == 1) cout << "kthSmallest [" << l << "," << r << "]: " << T.kthSmallest(l, r, k) << '\n';
355 | else if (t == 2) cout << "lessThanEqualToK [" << l << "," << r << "]: " << T.lessThanEqualToK(l, r, k) << '\n';
356 | else if (t == 3) cout << "equalToK [" << l << "," << r << "]: " << T.equalToK(l, r, k) << '\n';
357 | }
358 |
359 | // INPUT -> OUTPUT
360 | 7
361 | 1 2 3 3 5 4 2
362 | 4
363 | 1 5 7 1 1thSmallest [5,7]: 2
364 | 1 5 7 2 2thSmallest [5,7]: 4
365 | 2 2 6 4 lessThanEqualTo4 [2,6]: 4
366 | 3 2 5 3 equalTo3 [2,5]: 2
367 | */
368 | ```
369 |
370 | ## Segment Tree
371 |
372 | ## Square Root Decomposition
373 |
374 |
--------------------------------------------------------------------------------
/semester/README.md:
--------------------------------------------------------------------------------
1 | # Semester
2 |
3 |
--------------------------------------------------------------------------------
/semester/database.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ***Sample Table – Worker***
4 |
5 | |WORKER_ID | FIRST_NAME | LAST_NAME |SALARY | JOINING_DATE | DEPARTMENT |
6 | | ------------- |:-------------:| -----:| ------------- |:-------------:| -----:|
7 | | 001 | Monika| Arora| 100000 |2014-02-20 09:00:00| HR|
8 | |002| Niharika| Verma |80000 |2014-06-11 09:00:00| Admin|
9 | |003| Vishal| Singhal| 300000 |2014-02-20 09:00:00 |HR|
10 | |004| Amitabh| Singh| 500000| 2014-02-20 09:00:00| Admin|
11 | |005| Vivek| Bhati| 500000| 2014-06-11 09:00:00| Admin|
12 | |006| Vipul| Diwan |200000 |2014-06-11 09:00:00| Account|
13 | |007|Satish| Kumar |75000 |2014-01-20 09:00:00| Account|
14 | |008| Geetika |Chauhan| 90000| 2014-04-11 09:00:00| Admin|
15 |
16 |
17 |
18 |
19 |
20 | ***Sample Table – Bonus***
21 |
22 |
23 | |WORKER_REF_ID | BONUS_DATE | BONUS_AMOUNT |
24 | | ------------- |:-------------:| -----:|
25 | | 1 | 2016-02-20 00:00:00| 5000|
26 | |2| 2016-06-11 00:00:00| 3000 |
27 | |3| 2016-02-20 00:00:00| 4000|
28 | |1| 2016-02-20 00:00:00| 4500|
29 | |2| 2016-06-11 00:00:00| 3500|
30 |
31 |
32 | ***Sample Table – Title***
33 |
34 |
35 | |WORKER_REF_ID | WORKER_TITLE | AFFECTED_FROM|
36 | | ------------- |:-------------:| -----:|
37 | | 1 | Manager|2016-02-20 00:00:00 |
38 | |2| Executive| 2016-06-11 00:00:00 |
39 | |8| Executive| 2016-06-11 00:00:00|
40 | |5| Manager| 2016-06-11 00:00:00|
41 | |4|Asst. Manager| 2016-06-11 00:00:00|
42 | |7| Executive| 2016-06-11 00:00:00|
43 | |6| Lead| 2016-06-11 00:00:00|
44 | |3| Lead| 2016-06-11 00:00:00|
45 |
46 |
47 |
48 |
49 | _______________________________________
50 | **To prepare the sample data, you can run the following queries in your database query executor or on the SQL command line. We’ve tested them with MySQL Server 5.7 and MySQL Workbench 6.3.8 query browser. You can also download these Softwares and install them to carry on the SQL exercise.**
51 | _______________________________________
52 | **_SQL Script to Seed Sample Data_**
53 | _______________________________________
54 |
55 | ```
56 | CREATE DATABASE ORG;
57 | SHOW DATABASES;
58 | USE ORG;
59 | _________
60 |
61 | CREATE TABLE Worker (
62 | WORKER_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
63 | FIRST_NAME CHAR(25),
64 | LAST_NAME CHAR(25),
65 | SALARY INT(15),
66 | JOINING_DATE DATETIME,
67 | DEPARTMENT CHAR(25)
68 | );
69 |
70 | _________
71 |
72 |
73 | INSERT INTO Worker
74 | (WORKER_ID, FIRST_NAME, LAST_NAME, SALARY, JOINING_DATE, DEPARTMENT) VALUES
75 | (001, 'Monika', 'Arora', 100000, '14-02-20 09.00.00', 'HR'),
76 | (002, 'Niharika', 'Verma', 80000, '14-06-11 09.00.00', 'Admin'),
77 | (003, 'Vishal', 'Singhal', 300000, '14-02-20 09.00.00', 'HR'),
78 | (004, 'Amitabh', 'Singh', 500000, '14-02-20 09.00.00', 'Admin'),
79 | (005, 'Vivek', 'Bhati', 500000, '14-06-11 09.00.00', 'Admin'),
80 | (006, 'Vipul', 'Diwan', 200000, '14-06-11 09.00.00', 'Account'),
81 | (007, 'Satish', 'Kumar', 75000, '14-01-20 09.00.00', 'Account'),
82 |
83 | _________
84 |
85 |
86 | CREATE TABLE Bonus (
87 | WORKER_REF_ID INT,
88 | BONUS_AMOUNT INT(10),
89 | BONUS_DATE DATETIME,
90 | FOREIGN KEY (WORKER_REF_ID)
91 | REFERENCES Worker(WORKER_ID)
92 | ON DELETE CASCADE
93 | );
94 |
95 | _________
96 |
97 |
98 | INSERT INTO Bonus
99 | (WORKER_REF_ID, BONUS_AMOUNT, BONUS_DATE) VALUES
100 | (001, 5000, '16-02-20'),
101 | (002, 3000, '16-06-11'),
102 | (003, 4000, '16-02-20'),
103 | (001, 4500, '16-02-20'),
104 | (002, 3500, '16-06-11');
105 | CREATE TABLE Title (
106 | WORKER_REF_ID INT,
107 | WORKER_TITLE CHAR(25),
108 | AFFECTED_FROM DATETIME,
109 | FOREIGN KEY (WORKER_REF_ID)
110 | REFERENCES Worker(WORKER_ID)
111 | ON DELETE CASCADE
112 | );
113 |
114 | _________
115 |
116 |
117 | INSERT INTO Title
118 | (WORKER_REF_ID, WORKER_TITLE, AFFECTED_FROM) VALUES
119 | (001, 'Manager', '2016-02-20 00:00:00'),
120 | (002, 'Executive', '2016-06-11 00:00:00'),
121 | (008, 'Executive', '2016-06-11 00:00:00'),
122 | (005, 'Manager', '2016-06-11 00:00:00'),
123 | (004, 'Asst. Manager', '2016-06-11 00:00:00'),
124 | (007, 'Executive', '2016-06-11 00:00:00'),
125 | (006, 'Lead', '2016-06-11 00:00:00'),
126 | (003, 'Lead', '2016-06-11 00:00:00');
127 |
128 | ```
129 | ________________________________________
130 |
131 |
132 | **SQL Query Questions and Answers based on table created**
133 |
134 | ________________________________________
135 |
136 |
137 | ***Q-1. Write an SQL query to fetch “FIRST_NAME” from Worker table using the alias name as .***
138 |
139 | The required query is:
140 | ```
141 | Select FIRST_NAME AS WORKER_NAME from Worker;
142 | ```
143 | ***Q-2. Write an SQL query to fetch “FIRST_NAME” from Worker table in upper case.***
144 |
145 | The required query is:
146 | ```
147 |
148 | Select upper(FIRST_NAME) from Worker;
149 | ```
150 |
151 |
152 | ***Q-3. Write an SQL query to fetch unique values of DEPARTMENT from Worker table.***
153 |
154 | The required query is:
155 | ```
156 |
157 | Select distinct DEPARTMENT from Worker;
158 | ```
159 |
160 |
161 | ***Q-4. Write an SQL query to print the first three characters of FIRST_NAME from Worker table.***
162 |
163 | The required query is:
164 | ```
165 |
166 | Select substring(FIRST_NAME,1,3) from Worker;
167 | ```
168 |
169 |
170 | ***Q-5. Write an SQL query to find the position of the alphabet (‘a’) in the first name column ‘Amitabh’ from Worker table.***
171 |
172 | The required query is:
173 | ```
174 |
175 | Select INSTR(FIRST_NAME, BINARY'a') from Worker where FIRST_NAME = 'Amitabh';
176 | ```
177 |
178 | Notes.
179 | - The INSTR method is in case-sensitive by default.
180 | - Using Binary operator will make INSTR work as the case-sensitive function.
181 |
182 | ***Q-6. Write an SQL query to print the FIRST_NAME from Worker table after removing white spaces from the right side.***
183 |
184 | The required query is:
185 | ```
186 |
187 | Select RTRIM(FIRST_NAME) from Worker;
188 | ```
189 |
190 |
191 | ***Q-7. Write an SQL query to print the DEPARTMENT from Worker table after removing white spaces from the left side.***
192 |
193 | The required query is:
194 | ```
195 |
196 | Select LTRIM(DEPARTMENT) from Worker;
197 | ```
198 |
199 |
200 | ***Q-8. Write an SQL query that fetches the unique values of DEPARTMENT from Worker table and prints its length.***
201 |
202 | The required query is:
203 | ```
204 |
205 | Select distinct length(DEPARTMENT) from Worker;
206 | ```
207 |
208 |
209 | ***Q-9. Write an SQL query to print the FIRST_NAME from Worker table after replacing ‘a’ with ‘A’.***
210 |
211 | The required query is:
212 | ```
213 |
214 | Select REPLACE(FIRST_NAME,'a','A') from Worker;
215 | ```
216 |
217 |
218 | ***Q-10. Write an SQL query to print the FIRST_NAME and LAST_NAME from Worker table into a single column COMPLETE_NAME. A space char should separate them.***
219 |
220 | The required query is:
221 | ```
222 |
223 | Select CONCAT(FIRST_NAME, ' ', LAST_NAME) AS 'COMPLETE_NAME' from Worker;
224 | ```
225 |
226 |
227 | ***Q-11. Write an SQL query to print all Worker details from the Worker table order by FIRST_NAME Ascending.***
228 |
229 | The required query is:
230 | ```
231 |
232 | Select * from Worker order by FIRST_NAME asc;
233 | ```
234 |
235 |
236 | ***Q-12. Write an SQL query to print all Worker details from the Worker table order by FIRST_NAME Ascending and DEPARTMENT Descending.***
237 |
238 | The required query is:
239 | ```
240 |
241 | Select * from Worker order by FIRST_NAME asc,DEPARTMENT desc;
242 | ```
243 |
244 |
245 | ***Q-13. Write an SQL query to print details for Workers with the first name as “Vipul” and “Satish” from Worker table.***
246 |
247 | The required query is:
248 | ```
249 |
250 | Select * from Worker where FIRST_NAME in ('Vipul','Satish');
251 | ```
252 |
253 |
254 | ***Q-14. Write an SQL query to print details of workers excluding first names, “Vipul” and “Satish” from Worker table.***
255 |
256 | The required query is:
257 | ```
258 |
259 | Select * from Worker where FIRST_NAME not in ('Vipul','Satish');
260 | ```
261 |
262 |
263 | ***Q-15. Write an SQL query to print details of Workers with DEPARTMENT name as “Admin”.***
264 |
265 | The required query is:
266 | ```
267 |
268 | Select * from Worker where DEPARTMENT like 'Admin%';
269 | ```
270 |
271 |
272 | ***Q-16. Write an SQL query to print details of the Workers whose FIRST_NAME contains ‘a’.***
273 |
274 | The required query is:
275 | ```
276 |
277 | Select * from Worker where FIRST_NAME like '%a%';
278 | ```
279 |
280 |
281 | ***Q-17. Write an SQL query to print details of the Workers whose FIRST_NAME ends with ‘a’.***
282 |
283 | The required query is:
284 | ```
285 |
286 | Select * from Worker where FIRST_NAME like '%a';
287 | ```
288 |
289 |
290 | ***Q-18. Write an SQL query to print details of the Workers whose FIRST_NAME ends with ‘h’ and contains six alphabets.***
291 |
292 | The required query is:
293 | ```
294 |
295 | Select * from Worker where FIRST_NAME like '_____h';
296 | ```
297 |
298 |
299 | ***Q-19. Write an SQL query to print details of the Workers whose SALARY lies between 100000 and 500000.***
300 |
301 | The required query is:
302 | ```
303 |
304 | Select * from Worker where SALARY between 100000 and 500000;
305 | ```
306 |
307 |
308 | ***Q-20. Write an SQL query to print details of the Workers who have joined in Feb’2014.***
309 |
310 | The required query is:
311 | ```
312 |
313 | Select * from Worker where year(JOINING_DATE) = 2014 and month(JOINING_DATE) = 2;
314 | ```
315 |
316 |
317 | ***Q-21. Write an SQL query to fetch the count of employees working in the department ‘Admin’.***
318 |
319 | The required query is:
320 | ```
321 |
322 | SELECT COUNT(*) FROM worker WHERE DEPARTMENT = 'Admin';
323 | ```
324 |
325 |
326 | ***Q-22. Write an SQL query to fetch worker names with salaries >= 50000 and <= 100000.***
327 |
328 | The required query is:
329 | ```
330 |
331 | SELECT CONCAT(FIRST_NAME, ' ', LAST_NAME) As Worker_Name, Salary
332 | FROM worker
333 | WHERE WORKER_ID IN
334 | (SELECT WORKER_ID FROM worker
335 | WHERE Salary BETWEEN 50000 AND 100000);
336 | ```
337 |
338 |
339 | ***Q-23. Write an SQL query to fetch the no. of workers for each department in the descending order.***
340 |
341 | The required query is:
342 | ```
343 |
344 | SELECT DEPARTMENT, count(WORKER_ID) No_Of_Workers
345 | FROM worker
346 | GROUP BY DEPARTMENT
347 | ORDER BY No_Of_Workers DESC;
348 | ```
349 |
350 |
351 | ***Q-24. Write an SQL query to print details of the Workers who are also Managers.***
352 |
353 | The required query is:
354 | ```
355 |
356 | SELECT DISTINCT W.FIRST_NAME, T.WORKER_TITLE
357 | FROM Worker W
358 | INNER JOIN Title T
359 | ON W.WORKER_ID = T.WORKER_REF_ID
360 | AND T.WORKER_TITLE in ('Manager');
361 | ```
362 |
363 |
364 | ***Q-25. Write an SQL query to fetch duplicate records having matching data in some fields of a table.***
365 |
366 | The required query is:
367 | ```
368 |
369 | SELECT WORKER_TITLE, AFFECTED_FROM, COUNT(*)
370 | FROM Title
371 | GROUP BY WORKER_TITLE, AFFECTED_FROM
372 | HAVING COUNT(*) > 1;
373 | ```
374 |
375 |
376 | ***Q-26. Write an SQL query to show only odd rows from a table.***
377 |
378 | The required query is:
379 | ```
380 |
381 | SELECT * FROM Worker WHERE MOD (WORKER_ID, 2) <> 0;
382 | ```
383 |
384 |
385 | ***Q-27. Write an SQL query to show only even rows from a table.***
386 |
387 | The required query is:
388 | ```
389 |
390 | SELECT * FROM Worker WHERE MOD (WORKER_ID, 2) = 0;
391 | ```
392 |
393 |
394 | ***Q-28. Write an SQL query to clone a new table from another table.***
395 |
396 | The general query to clone a table with data is:
397 | ```
398 |
399 | SELECT * INTO WorkerClone FROM Worker;
400 | ```
401 |
402 | The general way to clone a table without information is:
403 | ```
404 |
405 | SELECT * INTO WorkerClone FROM Worker WHERE 1 = 0;
406 | ```
407 |
408 | An alternate way to clone a table (for MySQL) without is:
409 | ```
410 |
411 | CREATE TABLE WorkerClone LIKE Worker;
412 | ```
413 |
414 |
415 | ***Q-29. Write an SQL query to fetch intersecting records of two tables.***
416 |
417 | The required query is:
418 | ```
419 |
420 | (SELECT * FROM Worker)
421 | INTERSECT
422 | (SELECT * FROM WorkerClone);
423 | ```
424 |
425 |
426 | ***Q-30. Write an SQL query to show records from one table that another table does not have.***
427 |
428 | The required query is:
429 | ```
430 |
431 | SELECT * FROM Worker
432 | MINUS
433 | SELECT * FROM Title;
434 | ```
435 |
436 |
437 | ***Q-31. Write an SQL query to show the current date and time.***
438 |
439 | Following MySQL query returns the current date:
440 | ```
441 |
442 | SELECT CURDATE();
443 | ```
444 |
445 | Following MySQL query returns the current date and time:
446 | ```
447 |
448 | SELECT NOW();
449 | ```
450 |
451 | Following SQL Server query returns the current date and time:
452 | ```
453 |
454 | SELECT getdate();
455 | ```
456 |
457 | Following Oracle query returns the current date and time:
458 | ```
459 |
460 | SELECT SYSDATE FROM DUAL;
461 | ```
462 |
463 |
464 | ***Q-32. Write an SQL query to show the top n (say 10) records of a table.***
465 |
466 | Following MySQL query will return the top n records using the LIMIT method:
467 | ```
468 |
469 | SELECT * FROM Worker ORDER BY Salary DESC LIMIT 10;
470 | Following SQL Server query will return the top n records using the TOP command:
471 | SELECT TOP 10 * FROM Worker ORDER BY Salary DESC;
472 | Following Oracle query will return the top n records with the help of ROWNUM:
473 | SELECT * FROM (SELECT * FROM Worker ORDER BY Salary DESC)
474 | WHERE ROWNUM <= 10;
475 | ```
476 |
477 |
478 | ***Q-33. Write an SQL query to determine the nth (say n=5) highest salary from a table.***
479 |
480 | The following MySQL query returns the nth highest salary:
481 | ```
482 |
483 | SELECT Salary FROM Worker ORDER BY Salary DESC LIMIT n-1,1;
484 | The following SQL Server query returns the nth highest salary:
485 | SELECT TOP 1 Salary
486 | FROM (
487 | SELECT DISTINCT TOP n Salary
488 | FROM Worker
489 | ORDER BY Salary DESC
490 | )
491 | ORDER BY Salary ASC;
492 | ```
493 |
494 |
495 | ***Q-34. Write an SQL query to determine the 5th highest salary without using TOP or limit method.***
496 |
497 | The following query is using the correlated subquery to return the 5th highest salary:
498 | ```
499 |
500 | SELECT Salary
501 | FROM Worker W1
502 | WHERE 4 = (
503 | SELECT COUNT( DISTINCT ( W2.Salary ) )
504 | FROM Worker W2
505 | WHERE W2.Salary >= W1.Salary
506 | );
507 | ```
508 |
509 |
510 | Use the following generic method to find nth highest salary without using TOP or limit.
511 | ```
512 |
513 | SELECT Salary
514 | FROM Worker W1
515 | WHERE n-1 = (
516 | SELECT COUNT( DISTINCT ( W2.Salary ) )
517 | FROM Worker W2
518 | WHERE W2.Salary >= W1.Salary
519 | );
520 | ```
521 |
522 |
523 | ***Q-35. Write an SQL query to fetch the list of employees with the same salary.***
524 |
525 | The required query is:
526 | ```
527 |
528 | Select distinct W.WORKER_ID, W.FIRST_NAME, W.Salary
529 | from Worker W, Worker W1
530 | where W.Salary = W1.Salary
531 | and W.WORKER_ID != W1.WORKER_ID;
532 | ```
533 |
534 |
535 | ***Q-36. Write an SQL query to show the second highest salary from a table.***
536 |
537 | The required query is:
538 | ```
539 |
540 | Select max(Salary) from Worker
541 | where Salary not in (Select max(Salary) from Worker);
542 | ```
543 |
544 |
545 | ***Q-37. Write an SQL query to show one row twice in results from a table.***
546 |
547 | The required query is:
548 | ```
549 |
550 | select FIRST_NAME, DEPARTMENT from worker W where W.DEPARTMENT='HR'
551 | union all
552 | select FIRST_NAME, DEPARTMENT from Worker W1 where W1.DEPARTMENT='HR';
553 | ```
554 |
555 |
556 | ***Q-38. Write an SQL query to fetch intersecting records of two tables.***
557 |
558 | The required query is:
559 | ```
560 |
561 | (SELECT * FROM Worker)
562 | INTERSECT
563 | (SELECT * FROM WorkerClone);
564 | ```
565 |
566 |
567 | ***Q-39. Write an SQL query to fetch the first 50% records from a table.***
568 |
569 | The required query is:
570 | ```
571 |
572 | SELECT *
573 | FROM WORKER
574 | WHERE WORKER_ID <= (SELECT count(WORKER_ID)/2 from Worker);
575 | ```
576 |
577 |
578 | ***Q-40. Write an SQL query to fetch the departments that have less than five people in it.***
579 |
580 | The required query is:
581 | ```
582 | SELECT DEPARTMENT, COUNT(WORKER_ID) as 'Number of Workers' FROM Worker GROUP BY DEPARTMENT HAVING COUNT(WORKER_ID) < 5;
583 | ```
584 |
585 | ***Q-41. Write an SQL query to show all departments along with the number of people in there.***
586 |
587 | The following query returns the expected result:
588 | ```
589 | SELECT DEPARTMENT, COUNT(DEPARTMENT) as 'Number of Workers' FROM Worker GROUP BY DEPARTMENT;
590 | ```
591 |
592 |
593 | ***Q-42. Write an SQL query to show the last record from a table.***
594 |
595 | The following query will return the last record from the Worker table:
596 | ```
597 | Select * from Worker where WORKER_ID = (SELECT max(WORKER_ID) from Worker);
598 | ```
599 |
600 |
601 | ***Q-43. Write an SQL query to fetch the first row of a table.***
602 |
603 | The required query is:
604 | ```
605 | Select * from Worker where WORKER_ID = (SELECT min(WORKER_ID) from Worker);
606 | ```
607 |
608 |
609 | ***Q-44. Write an SQL query to fetch the last five records from a table.***
610 |
611 | The required query is:
612 | ```
613 | SELECT * FROM Worker WHERE WORKER_ID <=5
614 | UNION
615 | SELECT * FROM (SELECT * FROM Worker W order by W.WORKER_ID DESC) AS W1 WHERE W1.WORKER_ID <=5;
616 | ```
617 |
618 |
619 | ***Q-45. Write an SQL query to print the name of employees having the highest salary in each department.***
620 |
621 | The required query is:
622 | ```
623 | SELECT t.DEPARTMENT,t.FIRST_NAME,t.Salary from(SELECT max(Salary) as TotalSalary,DEPARTMENT from Worker group by DEPARTMENT) as TempNew
624 | Inner Join Worker t on TempNew.DEPARTMENT=t.DEPARTMENT
625 | and TempNew.TotalSalary=t.Salary;
626 | ```
627 |
628 | ***Q-46. Write an SQL query to fetch three max salaries from a table.***
629 |
630 | The required query is:
631 | ```
632 | SELECT distinct Salary from worker a WHERE 3 >= (SELECT count(distinct Salary) from worker b WHERE a.Salary <= b.Salary) order by a.Salary desc;
633 | ```
634 |
635 | ***Q-47. Write an SQL query to fetch three min salaries from a table.***
636 | Ans.
637 | The required query is:
638 | ```
639 | SELECT distinct Salary from worker a WHERE 3 >= (SELECT count(distinct Salary) from worker b WHERE a.Salary >= b.Salary) order by a.Salary desc;
640 | ```
641 |
642 | ***Q-48. Write an SQL query to fetch nth max salaries from a table.***
643 |
644 | The required query is:
645 | ```
646 | SELECT distinct Salary from worker a WHERE n >= (SELECT count(distinct Salary) from worker b WHERE a.Salary <= b.Salary) order by a.Salary desc;
647 | ```
648 |
649 | ***Q-49. Write an SQL query to fetch departments along with the total salaries paid for each of them.***
650 |
651 | The required query is:
652 | ```
653 | SELECT DEPARTMENT, sum(Salary) from worker group by DEPARTMENT;
654 | ```
655 |
656 | ***Q-50. Write an SQL query to fetch the names of workers who earn the highest salary.***
657 |
658 | The required query is:
659 | ```
660 | SELECT FIRST_NAME, SALARY from Worker WHERE SALARY=(SELECT max(SALARY) from Worker);
661 | ```
662 |
663 |
--------------------------------------------------------------------------------
/semester/javascript.md:
--------------------------------------------------------------------------------
1 | # Javscript
2 |
3 | ## Theory
4 |
5 | ### Q1: Can you name two programming paradigms important for JavaScript app developer?
6 |
7 | ```
8 | JavaScript is a multi-paradigm language, supporting procedural, function & object oriented programming.
9 |
10 | A multi-paradigm programming language is one that is equally well-suited in more than one programming paradigm. A programming paradigm is a style of programming like functional, OOP & procedural. Not many languages support all at a time.
11 |
12 | Java, Python, C++, C# also claims to be multi-paradigm
13 | ```
14 |
15 | ### Q2: What is asynchronous programming, and why is it important in JavaScript?
16 |
17 | ```
18 | Synchronous programming means that, barring conditionals and function calls, code is executed sequentially from top-to-bottom, blocking on long-running tasks such as network requests and disk I/O.
19 |
20 | Asynchronous programming means that the engine runs in an event loop. When a blocking operation is needed, the request is started, and the code keeps running without blocking for the result. When the response is ready, an interrupt is fired, which causes an event handler to be run, where the control flow continues. In this way, a single program thread can handle many concurrent operations.
21 |
22 | User interfaces are asynchronous by nature, and spend most of their time waiting for user input to interrupt the event loop and trigger event handlers.
23 | ```
24 |
25 | ### Q3: What are the pros and cons of monolithic vs microservice architectures?
26 |
27 | ```
28 | A monolithic architecture means that your app is written as one cohesive unit of code whose components are designed to work together, sharing the same memory space and resources.
29 |
30 | A microservice architecture means that your app is made up of lots of smaller, independent applications capable of running in their own memory space and scaling independently from each other across potentially many separate machines.
31 |
32 | Monolithic Pros: The major advantage of the monolithic architecture is that most apps typically have a large number of cross-cutting concerns, such as logging, rate limiting, and security features such audit trails and DOS protection.
33 | When everything is running through the same app, it’s easy to hook up components to those cross-cutting concerns.
34 |
35 | There can also be performance advantages, since shared-memory access is faster than inter-process communication (IPC).
36 |
37 | Monolithic cons: Monolithic app services tend to get tightly coupled and entangled as the application evolves, making it difficult to isolate services for purposes such as independent scaling or code maintainability.
38 |
39 | Monolithic architectures are also much harder to understand, because there may be dependencies, side-effects, and magic which are not obvious when you’re looking at a particular service or controller.
40 |
41 | Microservice pros: Microservice architectures are typically better organized, since each microservice has a very specific job, and is not concerned with the jobs of other components. Decoupled services are also easier to recompose and reconfigure to serve the purposes of different apps (for example, serving both the web clients and public API).
42 | They can also have performance advantages depending on how they’re organized because it’s possible to isolate hot services and scale them independent of the rest of the app.
43 |
44 | Microservice cons: As you’re building a new microservice architecture, you’re likely to discover lots of cross-cutting concerns that you did not anticipate at design time. A monolithic app could establish shared magic helpers or middleware to handle such cross-cutting concerns without much effort.
45 |
46 | In a microservice architecture, you’ll either need to incur the overhead of separate modules for each cross-cutting concern, or encapsulate cross-cutting concerns in another service layer that all traffic gets routed through.
47 | Eventually, even monolthic architectures tend to route traffic through an outer service layer for cross-cutting concerns, but with a monolithic architecture, it’s possible to delay the cost of that work until the project is much more mature.
48 |
49 | Microservices are frequently deployed on their own virtual machines or containers, causing a proliferation of VM wrangling work. These tasks are frequently automated with container fleet management tools.
50 | ```
51 |
52 | ## Practical
53 |
54 | ### Q1: What is a potential pitfall with using `typeof bar === "object"` to determine if `bar` is an object? How can this pitfall be avoided?
55 |
56 | ### Ans:
57 |
58 | ```
59 | This is a reliable way of checking however null is also considered object in Javascript so
60 | (bar && typeof bar === "object)
61 | this is correct way
62 | ```
63 |
64 | ### Q2: What will the code below output to the console and why?
65 |
66 | ```javascript
67 | (function () {
68 | var a = (b = 3);
69 | })();
70 | console.log("a defined? " + (typeof a !== "undefined"));
71 | console.log("b defined? " + (typeof b !== "undefined"));
72 | ```
73 |
74 | ### Ans
75 |
76 | ```
77 | var a = b = 3; is a shorthand for
78 | b = 3; // not var b = 3;
79 | var a = b;
80 |
81 | Now, if strict mode is on, then it will give a runtime error that b is not defined (since b is outside function) if strict mode is off then a is not defined but b is defined.
82 | ```
83 |
84 | ### Q3: What will the code below output to the console and why?
85 |
86 | ```javascript
87 | var myObject = {
88 | foo: "bar",
89 | func: function () {
90 | var self = this;
91 | console.log("outer func: this.foo = " + this.foo);
92 | console.log("outer func: self.foo = " + self.foo);
93 | (function () {
94 | console.log("inner func: this.foo = " + this.foo);
95 | console.log("inner func: self.foo = " + self.foo);
96 | })();
97 | },
98 | };
99 | myObject.func();
100 | ```
101 |
102 | ### Ans
103 |
104 | ```
105 | outer func: this.foo = bar
106 | outer func: self.foo = bar
107 | inner func: this.foo = undefined
108 | inner func: self.foo = bar
109 | ```
110 |
111 | ### Q4: What is the significance of, and reason for, wrapping the entire content of a JavaScript source file in a function block?
112 |
113 | ### Ans
114 |
115 | ```
116 | This is an increasingly common practice, employed by many popular JavaScript libraries (jQuery, Node.js, etc.). This technique creates a closure around the entire contents of the file which, perhaps most importantly, creates a private namespace and thereby helps avoid potential name clashes between different JavaScript modules and libraries.
117 | ```
118 |
119 | ### Q5: What is the significance, and what are the benefits, of including `use strict` at the beginning of a javascript source file?
120 |
121 | ### Ans
122 |
123 | ```
124 | it enforces stricter parsing and error handling. Code errors that would otherwise have been ignored or failed silently will now give error.
125 | - It makes debugging easier
126 | - Prevents accidental globals: Without strict mode, assigning a value to an undeclared variable automatically creates a global variable with that name. This is one of the most common errors in JavaScript. In strict mode, attempting to do so throws an error.
127 | - Disallows duplicate parameter values
128 | - Makes eval() safer
129 | ```
130 |
131 | ### Q6: Consider the two functions below. Will they both return the same thing? Why or why not?
132 |
133 | ```javascript
134 | function foo1() {
135 | return {
136 | bar: "hello",
137 | };
138 | }
139 |
140 | function foo2() {
141 | return;
142 | {
143 | bar: "hello";
144 | }
145 | }
146 | ```
147 |
148 | ### Ans
149 |
150 | ```
151 | Surprisingly, they both are different. foo1 returns {bar: "hello"} and foo2 returns undefined.
152 |
153 | This is because in javascript ; are optional (still we should write it for good practice) in foo2 return has no semicolon so parser puts one hence ignoring braces.
154 | ```
155 |
156 | ### Q7: What is NaN? What is its type? How can you reliably test if a value is equal to NaN?
157 |
158 | ### Ans
159 |
160 | ```
161 | NaN = Not a number like "abc" / 4 will give NaN. Although NaN is not a number but it's type is Number. isNaN() function is used to check.
162 |
163 | typeof NaN === 'number' (this is true)
164 | NaN === NaN (this is false XD)
165 | ```
166 |
167 | ### Q8: What is output of `console.log(0.1 + 0.2 === 0.3);`
168 |
169 | ### Ans: false
170 |
171 | ### Q9: Describe possible ways to write isNumber function
172 |
173 | ### Ans
174 |
175 | ```
176 | function isInteger(x) { return (typeof x === 'number) && (x % 1) === 0; }
177 |
178 | function isInteger(x) { return parseInt(x, 10) === x; }
179 |
180 | function isInteger(x) { return Math.round(x) === x; }
181 |
182 | xor number with 0, in javascript int float everything is stored as floting point.
183 | function isInteger(x) { return (x^0) === x; }
184 | ```
185 |
186 | ### Q10: Write output of
187 |
188 | ```javascript
189 | (function () {
190 | console.log(1);
191 | setTimeout(function () {
192 | console.log(2);
193 | }, 1000);
194 | setTimeout(function () {
195 | console.log(3);
196 | }, 0);
197 | console.log(4);
198 | })();
199 | ```
200 |
201 | ### Ans
202 |
203 | ```
204 | 1
205 | 4
206 | 3
207 | 2
208 | ```
209 |
210 | ### Q11: What gets logged to the console when the user clicks Button4 and why? Provide one or more alternate implementations that will work as expected.
211 |
212 | ```javascript
213 | for (var i = 0; i < 5; i++) {
214 | var btn = document.createElement("button");
215 | btn.appendChild(document.createTextNode("Button " + i));
216 | btn.addEventListener("click", function () {
217 | console.log(i);
218 | });
219 | document.body.appendChild(btn);
220 | }
221 | ```
222 |
223 | ### Ans
224 |
225 | ```
226 | No matter what button user clicks 5 will always be logged because at the time of event i is 5
227 |
228 | for (var i = 0; i < 5; i++) {
229 | var btn = document.createElement('button');
230 | btn.appendChild(document.createTextNode('Button ' + i));
231 | btn.addEventListener('click', (function(i) {
232 | return function() { console.log(i); };
233 | })(i));
234 | document.body.appendChild(btn);
235 | }
236 |
237 | // or simplest solution just use let instead of var
238 | for (let i = 0; i < 5; i++) {
239 | var btn = document.createElement('button');
240 | btn.appendChild(document.createTextNode('Button ' + i));
241 | btn.addEventListener('click', function(){ console.log(i); });
242 | document.body.appendChild(btn);
243 | }
244 | // https://stackoverflow.com/questions/762011/whats-the-difference-between-using-let-and-var
245 | ```
246 |
247 | ### Q12: What will be the output of `console.log(typeof typeof 1);`
248 |
249 | ### Ans: string because typeof "number" is string
250 |
251 | ### Q13: How do you add an element at the beggining and end of array?
252 |
253 | ### Ans: myArr = ['start', ...myArr, 'end'];
254 |
255 | ### Q14: What is output of console.log(3 > 2 > 1);
256 |
257 | ### Ans: False XD because javascript reads from left to right it will become true > 1, true has value 1 so 1 > 1 is false therefore it gives false
258 |
259 | ### Q15: How to clone an object?
260 |
261 | ### Ans
262 |
263 | ```
264 | var obj = {a: 1, b: 2};
265 | var objClone = Object.assign({}, obj);
266 |
267 | this only creates a shallow copy here it's fine but if obj contains nested object it will fail, for that need to itterate and re call assign
268 | ```
269 |
270 | ### Q16: What will be the output of this code?
271 |
272 | ```javascript
273 | var x = 21;
274 | var girl = function () {
275 | console.log(x);
276 | var x = 20;
277 | };
278 | girl();
279 | ```
280 |
281 | ### Ans:
282 |
283 | ```
284 | undefined
285 |
286 | It's because x gets hoisted inside the function because of which global x value gets masked (if local x was not there then 21 must be output)
287 | ```
288 |
--------------------------------------------------------------------------------
/square-root-algorithms.md:
--------------------------------------------------------------------------------
1 | # Square Root Algorithms
2 |
3 | ### Simple Range Query-Update Problem \(Sum/Max/Min\)
4 |
5 | If we divide our regular array of size n to blocks each having size √n \(last block may have lesser elements\) then we can update in O\(1\) and query in O\(**√n\)**
6 |
7 | ```cpp
8 | // build
9 | int len = (int) sqrt(n + .0) + 1;
10 | vec<1, int> blocks(len, 0);
11 | for (int i = 0; i < n; ++i) blocks[i/len] += arr[i];
12 |
13 | // update
14 | int oldVal = arr[x]
15 | arr[x] = val;
16 | blocks[x/len] += val - oldVal;
17 |
18 | // query: sum [l, r]
19 | int l = 2, r = 5, res = 0;
20 | int _l = l/len, _r = r/len;
21 | if (_l == _r)
22 | for (int i = l; i <= r; ++i) res += arr[i];
23 | else
24 | {
25 | for (int i = l, end = ((_l+1)*len - 1); i <= end; ++i) res += arr[i];
26 | for (int i = _l+1; i <= _r-1; ++i) res += blocks[i];
27 | for (int i = _r*len; i <= r; ++i) res += arr[i];
28 | }
29 | ```
30 |
31 | Simmilarly we can find minimum and maximum using this.
32 |
33 | ### Case Processing
34 |
35 | Given a 2D n x n grid, each cell is assigned a letter. Find two cells with same letter whose manhattan distance is minimum. In below case its 'E'.
36 |
37 | 
38 |
39 | **Algorithm 1**: Go through all all pairs of cells with letter c \(let's say there are k blocks with c letter\) it will be K^2
40 |
41 | **Algorithm 2**: Perform a breadth-first search that simultaneously starts at each cell with letter c. The minimum distance between two cells with letter c will be calculated in O\(n\) time.
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/system-design.md:
--------------------------------------------------------------------------------
1 | # System Design
2 |
3 | ## Design Patterns
4 |
5 | ### Singleton Class
6 |
7 | ```cpp
8 | class Restaurant
9 | {
10 | private:
11 | static Restaurant _instance = NULL;
12 | public:
13 | static Restaurant getInstance()
14 | {
15 | if (!_instance) _instance = Restaurant();
16 | return _instance;
17 | }
18 | };
19 | ```
20 |
21 | > Can interfere unit testing - provide a well-known point of access to some service in your application so that you don’t have to pass around a reference to that service. How is that different from a global variable? \(remember, globals are bad, right???\) What ends up happening is that the dependencies in your design are hidden inside the code, and not visible by examining the interfaces of your classes and methods. You have to inspect the code to understand exactly what other objects your class uses.
22 |
23 | ### Factory Method
24 |
25 | ```cpp
26 | class CardGame
27 | {
28 | public:
29 | static CardGame createCardGame(GameType type)
30 | {
31 | if (type == GameType::POKER) return new PokerGame();
32 | else if (type == GameType::BLACKJACK) return new Blackjack();
33 | return NULL;
34 | }
35 | };
36 | ```
37 |
38 | ## Common Questions
39 |
40 | ### Deck of Cards
41 |
42 | Design the data structure for a generic deck of cards. Explain how would you subclass the data structures to implement blackjack.
43 |
44 | ```cpp
45 |
46 | ```
47 |
48 | ## Grokking The System Design Interviews
49 |
50 | Part 1: [https://coursehunters.online/t/educative-io-design-gurus-grokking-the-system-design-interview-part-1/579](https://coursehunters.online/t/educative-io-design-gurus-grokking-the-system-design-interview-part-1/579)
51 | Part 2: [https://coursehunters.online/t/educative-io-design-gurus-grokking-the-system-design-interview-part-2/580](https://coursehunters.online/t/educative-io-design-gurus-grokking-the-system-design-interview-part-2/580)
52 | Part 3: [https://coursehunters.online/t/educative-io-design-gurus-grokking-the-system-design-interview-part-3/581](https://coursehunters.online/t/educative-io-design-gurus-grokking-the-system-design-interview-part-3/581)
53 | Part 4: [https://coursehunters.online/t/educative-io-design-gurus-grokking-the-system-design-interview-part-4/583](https://coursehunters.online/t/educative-io-design-gurus-grokking-the-system-design-interview-part-4/583)
54 | Part 5: [https://coursehunters.online/t/educative-io-design-gurus-grokking-the-system-design-interview-part-5/584](https://coursehunters.online/t/educative-io-design-gurus-grokking-the-system-design-interview-part-5/584)
55 |
56 |
--------------------------------------------------------------------------------
/tips-and-tricks.md:
--------------------------------------------------------------------------------
1 | # Tips & Tricks
2 |
3 | ## VS Code Snippet Template
4 |
5 | {% file src=".gitbook/assets/cpp.json" caption="cpp.json" %}
6 |
7 | ## Compilation flag
8 |
9 | ```bash
10 | time g++ -std=c++17 cprog.cpp && timeout 5 ./a.out < i > o
11 | ```
12 |
13 | With sanitizers
14 |
15 | ```bash
16 | time g++ -std=c++17 cprog.cpp -Wshadow -Wall -g -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG && timeout 5 ./a.out < i > o
17 | ```
18 |
19 | ## Stress Test
20 |
21 | ```cpp
22 | #include
23 | using namespace std;
24 |
25 | int LIMIT = 1000;
26 | void generateTestCase()
27 | {
28 | ofstream fout("i");
29 | int n = 20;
30 | fout << n << '\n';
31 | while (n--)
32 | {
33 | int x = 1 + rand()%1000;
34 | fout << x << " ";
35 | }
36 | fout << '\n';
37 | fout.close();
38 | }
39 | string inp, wa, ac;
40 | int main()
41 | {
42 | system("g++ -std=c++17 cprog.cpp -o ac.out");
43 | system("g++ -std=c++17 ctest.cpp -o wa.out");
44 | srand(time(0));
45 | while (LIMIT--)
46 | {
47 | generateTestCase();
48 | ifstream inpf("i");
49 | getline(inpf, inp, char(EOF));
50 | inpf.close();
51 |
52 | system("./wa.out < i > o");
53 | ifstream waf("o");
54 | getline(waf, wa, char(EOF));
55 | waf.close();
56 |
57 | system("./ac.out < i > o");
58 | ifstream acf("o");
59 | getline(acf, ac, char(EOF));
60 | acf.close();
61 |
62 | if (wa != ac)
63 | {
64 | cout << "Failed at:\n";
65 | cout << inp << '\n';
66 | cout << "Expected:\n";
67 | cout << ac << '\n';
68 | cout << "Found:\n";
69 | cout << wa << '\n';
70 | cout << "-----------\n\n";
71 | }
72 | }
73 | return 0;
74 | }
75 | ```
76 |
77 | ### **Regex**
78 |
79 | ```cpp
80 | string str = "Hello\tWorld\n";
81 | string raw_str = R"(Hello\tWorld
82 | this is ankit\n)";
83 | /* Output:
84 | Hello World
85 | Hello\tWorld
86 | this is ankit\n
87 |
88 | raw strings escape \t \n and considers real
89 | new line instrings doing new line gives error
90 | unless done with escape character \ like in
91 | macro */
92 |
93 | // Regex match
94 | // https://youtu.be/sa-TUpSx1JA
95 | /*
96 | . - Any Character Except New Line
97 | \d - Digit (0-9)
98 | \D - Not a Digit (0-9)
99 | \w - Word Character (a-z, A-Z, 0-9, _)
100 | \W - Not a Word Character
101 | \s - Whitespace (space, tab, newline)
102 | \S - Not Whitespace (space, tab, newline)
103 |
104 | \b - Word Boundary
105 | \B - Not a Word Boundary
106 | ^ - Beginning of a String
107 | $ - End of a String
108 |
109 | [] - Matches Characters in brackets
110 | [^ ] - Matches Characters NOT in brackets
111 | | - Either Or
112 | ( ) - Group
113 |
114 | Quantifiers:
115 | * - 0 or More
116 | + - 1 or More
117 | ? - 0 or One
118 | {3} - Exact Number
119 | {3,4} - Range of Numbers (Minimum, Maximum)
120 | */
121 | regex email_pattern(R"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)");
122 | if (regex_match("ankitpriyarup@gmail.com", email_pattern))
123 | cout << "Yes" << endl;
124 | else
125 | cout << "No" << endl;
126 | ```
127 |
128 | ### All, Any, None
129 |
130 | ```cpp
131 | if (all_of(all(arr), [](const int x){ return x >= 1 && x <= 5; }))
132 | cout << "All values in range";
133 |
134 | // simmlarly there are none_of any_of
135 | ```
136 |
137 | ### Policy Based Data Structures
138 |
139 | Gives access to the indices that the elements would have in a sorted array.
140 |
141 | ```cpp
142 | pbds A; // works in logN
143 | A.insert(1); A.insert(3); A.insert(5); A.insert(7); A.insert(9); A.insert(11);
144 |
145 | // Iterator of element at specified pos k
146 | A.find_by_order(k)
147 | // Position of x in sorted array
148 | A.order_of_key(x)
149 |
150 | // If the element is not present we get the pos that the element
151 | // would have in set if present
152 | ```
153 |
154 | ### Matrix Exponentiation
155 |
156 | ```cpp
157 | // Fibonacci
158 | Matrix T(2, 2), F(2, 1);
159 | T.mat = {{0, 1}, {1, 1}};
160 | F.mat = {{0}, {1}};
161 | T ^= n;
162 | T *= F;
163 | cout << T.mat[0][0] << '\n';
164 | ```
165 |
166 | ### Unordered map with custom hashfunction
167 | ```c++
168 | struct hash_pair
169 | {
170 | template
171 | size_t operator()(const pair& p) const
172 | {
173 | auto hash1 = hash{}(p.first);
174 | auto hash2 = hash{}(p.second);
175 | return hash1 ^ hash2;
176 | }
177 | };
178 |
179 | unordered_map, int, hash_pair> rec;
180 | ```
181 |
182 | ### Lowerbound on set>
183 | ```c++
184 | x.lower_bound({first, -inf});
185 | ```
--------------------------------------------------------------------------------