Advertisement
Guest User

visa.md

a guest
Feb 8th, 2021
1,494
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # **VISA**
  2.  
  3.  
  4. # My Rounds
  5.  
  6.  
  7. ## Online
  8.  
  9.  
  10.  
  11. 1. Find the longest subarray in an unsorted array that has an abs diff b/w adj elem <= 1 after being sorted. **my approach:** sort and find sub array count of adj elems with abs diff <=1
  12. 1. could it be [this](https://leetcode.com/problems/longest-consecutive-sequence/discuss/41060/A-simple-C%2B%2Bsolution-using-unordered_set.And-simple-consideration-about-this-problem)?
  13. 2. [some variant of this](https://leetcode.com/problems/k-diff-pairs-in-an-array/)
  14.  
  15.  
  16. ## Tech1
  17.  
  18.  
  19.  
  20. 1. [LRU cache](https://leetcode.com/problems/lru-cache/discuss/45911/Java-Hashtable-%2B-Double-linked-list-(with-a-touch-of-pseudo-nodes)). 0 TC Passed.
  21. 2. [what is 3NF](https://www.geeksforgeeks.org/third-normal-form-3nf/)
  22.  
  23.  
  24. ## Tech2
  25.  
  26.  
  27.  
  28. 1. My introduction was stellar. Put serious thought into it. Mine was a sales pitch of myself.
  29. 2. [variant of this](https://leetcode.com/problems/uncommon-words-from-two-sentences/). delimiters were comma, period, ?, ! and spaces. hyphens to join words. words are made of only [a-z][A-Z]. 0 TC Passed. Complimented my logic and thought process.
  30. 3. [SQL subquery to find employees with max salary](https://www.w3resource.com/sql-exercises/employee-database-exercise/sql-subqueries-exercise-employee-database-19.php)
  31. 4. [NoSQL vs SQL](https://hackernoon.com/sql-vs-nosql-what-is-better-for-you-cc9b73ab1215)
  32. 5. [process vs thread](https://www.geeksforgeeks.org/difference-between-process-and-thread/)
  33. 6. What’s keeping you from leaving VISA?
  34. 7. Dropped some talking points from the pre-placement talk
  35.  
  36.  
  37. ## HR
  38.  
  39.  
  40.  
  41. 1. Introduction
  42. 2. System Design problem. What to do if there are too many requests to a web server? Don’t know if they’re correct. I feel it was more a test to see you critical thinking and acquired knowledge.
  43. 1. Load balancing
  44. 2. Redundant Servers ready to deploy
  45. 3. Caching requests
  46. 3. What do you want to work in?
  47. 4. Why do you want to join VISA?
  48. 5. Asked what kept them at VISA? And what they’re objective in their career?
  49. 6. Got a compliment and an offer the next day.
  50.  
  51.  
  52. ## My Prep
  53.  
  54. ~100 LC Mediums and g4g visa interview exps. Prepped core CS questions very well.
  55.  
  56.  
  57. ## Tips
  58.  
  59.  
  60.  
  61. 1. For DSA, mention your **time and space complexity** before you start explaining your DSA problem. Write out a couple test cases that you want to test your logic on, and why you chose those specific test cases. Make sure the interview is following your explanation if they’re quiet, ask them if they’re following or where you lost them. Be very vocal about your problem solving logic.
  62. 2. For Core CS, explain the need for something, where it’s useful, and then define it. Pros and cons if you can too. Other alternatives. Where you used them.
  63. 3. For HR questions, give an example in your life where the questions are applicable. Use [STAR reply](https://www.thebalancecareers.com/what-is-the-star-interview-response-technique-2061629) for those scenarios.
  64. 4. Create an interview prep doc with hyperlinks and appropriate headings as a cheat sheet.
  65.  
  66.  
  67. # Core CS
  68.  
  69.  
  70. ## Algo
  71.  
  72.  
  73.  
  74. 1. [heap sort](https://www.geeksforgeeks.org/heap-sort/)
  75. 2. [quick sort](https://www.youtube.com/watch?v=SLauY6PpjW4)
  76. 3. [merge sort](https://www.geeksforgeeks.org/merge-sort/)
  77.  
  78.  
  79. ## Crypto
  80.  
  81. 1. [ tldr about encryption, hashing and salting](https://www.thesslstore.com/blog/difference-encryption-hashing-salting/)
  82. 2. [SQL Injection patches](https://www.hacksplaining.com/prevention/sql-injection)
  83. 1. regex check
  84. 2. give less privelege
  85. 3. salted hashes
  86. 4. 3rd party [OAuth](https://www.varonis.com/blog/what-is-oauth/#:~:text=OAuth%20doesn't%20share%20password,without%20giving%20away%20your%20password.) or [SSO](https://www.onelogin.com/learn/how-single-sign-on-works#:~:text=How%20does%20SSO%20work%3F,an%20identity%20provider%2C%20like%20OneLogin.&text=In%20SSO%2C%20this%20identity%20data,email%20address%20or%20a%20username.)
  87. 1. OAuth is an authorization protocol that allows a user to selectively decide **which services can do what with a user’s data.** OAuth’s primary purpose is to give users more control over their data, so you can **selectively grant access to various bits of functionality** for various applications that you may want to use.
  88. 2. SSO is an authentication / authorization flow through which a user can log into **multiple services using the same credentials**. only a single account and password to remember which gets them into all of their services.
  89. 5. parameterized statements
  90. 3. [Symetric vs Assymetric Encryption](https://sectigostore.com/blog/5-differences-between-symmetric-vs-asymmetric-encryption/)
  91. 6. [public key exchange](https://www.youtube.com/watch?v=GSIDS_lvRv4)
  92. 7. [diffie hellman key exchange ](https://www.youtube.com/watch?v=NmM9HA2MQGI)is how the keys are excahgned
  93. 3. man in the middle attack vuln
  94. 8. [problems with diffie hellman key exchange](https://www.youtube.com/watch?v=vsXMMT2CqqE)
  95. 4. signed with private key using a hash algo like RSA to avoid man in the middle
  96. 9. symm
  97. 5. 1 key. if found over
  98. 6. AES
  99. 7. faster
  100. 10. assym
  101. 8. 2 keys
  102. 9. diffie hellman
  103. 10. secure
  104. 4. Paper I wrote be through
  105. 11. Public Key Authority
  106. 11. grants certificates that verify your identity and says that your public belongs to you
  107. 12. Certificates etc
  108. 5. XSS attack
  109. 13. [tom scott](https://www.youtube.com/watch?v=L5l9lSnNMxg)
  110. 14. can steal csrf, cookies, read tags
  111. 15. DOMpurify
  112. 16. <
  113. 6. [digital signing](https://www.globalsign.com/en/blog/how-do-digital-signatures-work#:~:text=When%20you%20click%20%22sign%22%2C,created%20using%20a%20mathematical%20algorithm.&text=The%20hash%20is%20encrypted%20using,is%20appended%20to%20the%20document.)
  114.  
  115.  
  116. 1. Encryption vs hashing
  117. 1. Encryption is a two-way function. When you encrypt something, you’re doing so with the intention of decrypting it later. This is a key distinction between encryption and hashing (forgive me the pun).
  118. 2. hashing is used for digital signatures with a encryption
  119. 2. [salts](https://auth0.com/blog/adding-salt-to-hashing-a-better-way-to-store-passwords/#:~:text=A%20cryptographic%20salt%20is%20made,compute%20them%20using%20the%20salts.) | [how to compromise a salted hash password](https://security.stackexchange.com/questions/180535/how-does-the-attacker-know-what-algorithm-and-salt-to-use-in-a-dictionary-attack/180536#180536)
  120. 3. The salt is generally stored in the database right next to the hash. In fact, it needs to be. How else could the web server hash the incoming passwords when checking them? So if you have a database dump, you have the salts.
  121.  
  122.  
  123. ## DS
  124.  
  125. 1. [ types of binary trees](https://www.upgrad.com/blog/5-types-of-binary-tree/)
  126. 1. FULL: 0 or 2 children
  127. 2. COMPLETE: all levels filled except lowest, and all leaf nodes fill left to right
  128. 3. PERFECT: all have 2 children
  129. 4. BALANCED: height of subtrees are off by at most 1
  130. 5. DEGENERATE: only 1 child
  131. 2. graph
  132. 6. [topo sort](https://www.codingame.com/start)
  133. 7. SCC
  134. 1. topo style stack build
  135. 2. transpose graph, i.e., invert parent-child relatioship
  136. 8. [shortest path](https://www.youtube.com/watch?v=GazC3A4OQTE) | [g4g](https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-using-priority_queue-stl/)
  137. 3. priority_queue<int, vector<int>, greater<int>> pq // min heap PQ
  138. 4. priority_queue<int> // max heap PQ
  139. 9. min spanning trees
  140. 3. [heap](https://www.geeksforgeeks.org/binary-heap/)
  141. 10. data members
  142. 5. capacity
  143. 6. count
  144. 7. *heapArray
  145. 11. main
  146. 8. heap(capacity)
  147. 9. insert(key)
  148. 10. delete(key)
  149. 1. check
  150. 2. decreaseKey(key, val)
  151. 11. extractMin()
  152. 12. heapify(0)
  153. 12. utility
  154. 13. left
  155. 14. right
  156. 15. parent
  157. 16. swap
  158. 17. decreaseKey(key, val=INT_MIN)
  159.  
  160.  
  161. ## DBMS
  162.  
  163.  
  164.  
  165. 1. [SQL interviewbit FAQs](https://www.interviewbit.com/sql-interview-questions/)
  166.  
  167. 1. **FOREIGN KEY** comprises of single or collection of fields in a table that essentially refer to the PRIMARY KEY in another table
  168. 2. **Denormalization** is the inverse process of normalization, where the normalized schema is converted into a schema which has redundant information. The reason for performing denormalization is the overheads produced in the query processor by an over-normalized structure.
  169.  
  170. 2. [SQL query FAQ 1](https://www.techbeamers.com/sql-query-questions-answers-for-practice/#sql-queries)
  171.  
  172. 3. ^^TOP, LIMIT, OFFSET, UPPER, DISTINCT
  173. 4. Show only odd rows from a table
  174. 1. SELECT *
  175. 2. FROM Worker
  176. 3. WHERE MOD (WORKER_ID, 2) <> 0;
  177. 5. clone a new table from another table
  178. 4. CREATE TABLE WorkerClone LIKE Worker;
  179. 6. show the top n (say 10) records of a table.
  180. 5. SELECT *
  181. 6. FROM Worker
  182. 7. ORDER BY Salary DESC
  183. 8. LIMIT 10 OFFSET 0;
  184. 7. fetch the list of employees with the same salary
  185. 9. Select distinct W.WORKER_ID, W.FIRST_NAME, W.Salary
  186. 10. from Worker W, Worker W1
  187. 11. where W.Salary = W1.Salary
  188. 12. and W.WORKER_ID != W1.WORKER_ID;
  189. 8. 2nd highest salary | subquery used for NULL value case
  190. 13. select
  191. 14. (select distinct Salary
  192. 15. from Employee
  193. 16. order by Salary desc
  194. 17. limit 1 offset 1) as SecondHighestSalary;
  195. 9. intersection of 2 tables
  196. 18. (SELECT * FROM Worker)
  197. 19. INTERSECT
  198. 20. (SELECT * FROM WorkerClone);
  199. 10. half of all entries
  200. 21. mysql
  201. 1. SELECT TOP 50 PERCENT *
  202. 2. FROM Customers;
  203. 22. ORACLE
  204. 3. select *
  205. 4. from my_table
  206. 5. where rownum <= (select count(*)/2 from my_table)
  207. 11. to fetch the departments that have less than five people in it
  208. 23. SELECT DEPARTMENT, COUNT(WORKER_ID) as 'Number of Workers'
  209. 24. FROM Worker
  210. 25. GROUP BY DEPARTMENT
  211. 26. HAVING COUNT(WORKER_ID) < 5;
  212. 12. show the last record from a table.
  213. 27. SELECT **LAST** (CUSTOMER_NAME) AS LAST_CUSTOMER
  214. 28. FROM CUSTOMERS;
  215. 13. max sal in each dept
  216. 29. SELECT DeptID, MAX(Salary)
  217. 30. FROM EmpDetails
  218. 31. GROUP BY DeptID
  219. 14.
  220.  
  221. 3. SQL query interview bit
  222.  
  223. 15. rating is NULL NOT rating = NULL
  224. 16. ^^work on subqueries
  225.  
  226. 4. Normal Forms w/ examples
  227.  
  228. 17. **1NF **remove multi values columns into separate columns
  229.  
  230. 18. **2NF **table into primary and foreign key
  231.  
  232. 19. **3NF** remove transitive dependencies
  233.  
  234. Example: table1 -> table2 -> table3 TO table1->table3
  235.  
  236. 20. **[BCNF](https://www.quora.com/What-is-the-distinction-between-BCNF-and-3NF-Is-there-a-reason-to-prefer-one-over-the-other)** acts differently from 3NF only when there are multiple overlapping candidate keys.
  237.  
  238. 5. [transactions and the need for ACID properties](https://www.geeksforgeeks.org/acid-properties-in-dbms/)
  239.  
  240. 6. [What is indexing? ](https://www.geeksforgeeks.org/indexing-in-databases-set-1/#:~:text=Indexing%20is%20a%20way%20to,using%20a%20few%20database%20columns.)What are the advantages of indexing? What are the different types of indexing with example?
  241.  
  242. 7. DBMS basics for efficiency :- Indexing viz. B+trees , Hashing
  243.  
  244. 8. [star schema](https://www.geeksforgeeks.org/star-schema-in-data-warehouse-modeling/)
  245.  
  246. It includes one or more fact tables indexing any number of dimensional tables. The star schema is a necessary case of the snowflake schema. It is also efficient for handling basic queries.
  247.  
  248.  
  249. 9. NoSQL vs SQL. RDB vs DBMS
  250.  
  251. 21. SQL databases are primarily called as Relational Databases (RDBMS); whereas NoSQL databases are primarily called as non-relational or distributed databases.
  252. 22. SQL databases follow ACID properties (Atomicity, Consistency, Isolation and Durability) whereas the NoSQL database follows the Brewers CAP theorem (Consistency, Availability and Partition tolerance).
  253. 23. SQL databases are table-based on the other hand NoSQL databases are either key-value pairs, document-based, graph databases or wide-column stores.
  254.  
  255. 10. SQL injections (crypto sub heading)
  256.  
  257. 11. [Delete vs Truncate vs Drop](https://www.geeksforgeeks.org/difference-between-delete-drop-and-truncate/)
  258.  
  259. 24. DELETE
  260.  
  261. 32. to delete the one or more tuples of a table.
  262.  
  263. 33. If we want to delete all the rows of the table:
  264.  
  265. DELETE from ;
  266.  
  267. 34. row as per using condition then use WHERE
  268.  
  269. DELETE from WHERE ;
  270.  
  271. 25. DROP
  272.  
  273. 35. drop the whole table
  274.  
  275. DROP table_name
  276.  
  277. 36. TRUNCATE
  278.  
  279. 6. delete all the rows of a relation
  280.  
  281. TRUNCATE ;
  282.  
  283. 12. [Where vs Having](https://www.geeksforgeeks.org/having-vs-where-clause-in-sql/)
  284.  
  285. 26. The difference between the having and where clause in SQL is that the where clause cannot be used with aggregates, but the having clause can.
  286.  
  287. 13. Stored Procedure
  288.  
  289. 14. Views
  290.  
  291.  
  292. ## Language
  293.  
  294.  
  295.  
  296. 1. [What is an interpreted language, what are the differences between Interpreted and compiled languages.](https://www.geeksforgeeks.org/difference-between-compiled-and-interpreted-language/)
  297. 1. compiled fast cause in machine code of target system compiled on
  298. 2. errors are shown during compile time and won’t build otherwise
  299. 2. [argument vs. parameter](https://www.geeksforgeeks.org/difference-between-argument-and-parameter-in-c-c-with-examples/)
  300. 3. argument: values that are passed within a function when the function is called
  301. 4. parameter: variables that are defined during a function declaration or definition
  302. 3. [Interface and Abstract class](https://www.javatpoint.com/difference-between-abstract-class-and-interface)
  303. 4. What is Concurrent programming?
  304. 5. [memory leak](https://www.geeksforgeeks.org/memory-leak-in-c-and-how-to-avoid-it/)
  305.  
  306. Memory leakage occurs in C++ when programmers allocates memory by using new keyword and forgets to deallocate the memory by using delete() function or delete[] operator. One of the most memory leakage occurs in C++ by using wrong delete operator.
  307.  
  308. 6. [smart pointers](https://www.geeksforgeeks.org/smart-pointers-cpp/)
  309.  
  310.  
  311. ## ML
  312.  
  313. 1. [precision and recall](https://developers.google.com/machine-learning/crash-course/classification/precision-and-recall)
  314. 1. precision: What proportion of positive identifications was actually correct?
  315. 2. recall: What proportion of actual positives was identified correctly?
  316.  
  317.  
  318. ## Network
  319.  
  320.  
  321.  
  322. 1. [TCP/IP model](https://practice.geeksforgeeks.org/problems/tcpip-model/)
  323.  
  324.  
  325. ### TCP / IP (Transmission Control Protocol / Internet Protocol)
  326.  
  327.  
  328. Four layered architecture which provides end to end communication, specifying how data should be formed in packets, addressed, transmitted, routed and received.
  329.  
  330.  
  331. The four layers are organized as :
  332.  
  333.  
  334. **Layer 4 Application Layer (Topmost Layer) **
  335.  
  336.  
  337. The application layer of the TCP/IP model is used to handle all process-to-process communication functions. The basic functions which are carried out by this layer are session establishment, maintenance and termination, data conversion, compression, encryption etc.Some of the common protocols used here are :
  338.  
  339.  
  340.  
  341. * TELNET - a two-way communication protocol which allows connecting to a remote machine and run applications on it.
  342.  
  343. * FTP(File Transfer Protocol) - allows file transfer among computer users connected over a network.
  344.  
  345. * SMTP(Simple Mail Transport Protocol) - used to transport electronic mails between a source and destination.
  346.  
  347. * DNS(Domain Name Server) - resolves an IP address into a textual address for hosts connected over a network.
  348.  
  349. **Layer 3 Transport Layer **
  350.  
  351.  
  352. The purpose of transport layer is to permit devices on the source and destination hosts for conversation. It defines the level of status of the connection used when transporting data.The main protocols included at Transport layer are
  353.  
  354. 1. Transmission Control Protocol (TCP) - TCP is a connection-oriented protocol that guarantees delivery of data and in the same order in which they were sent.
  355.  
  356. 2. User Datagram Protocol (UDP) - UDP is connectionless sending packets in chunks.
  357.  
  358. **Layer 2 Netowork Layer**
  359.  
  360.  
  361. This layer packs data into data packets known as datagrams, which contain source and destination address information that is used to forward the datagrams between hosts and across networks. This layer is also responsible for routing of these datagrams, along with functions like traffic routing, traffic control, fragmentation. The main protocols included at Transport layer are :
  362.  
  363. 1. Internet Protocol (IP) - used for relaying datagrams across network boundaries.
  364.  
  365. 2. Internet Control Message Protocol (ICMP) - used by network devices to send error messages and operational information indication
  366.  
  367. 3. Internet Group Management Protocol (IGMP) - used to establish multi cast group membership
  368.  
  369. **Layer 1 Link Layer / Network Access Layer (Lower most Layer) **
  370.  
  371.  
  372. The link layer combines the physical and data link layer functions into a single layer. This includes frame physical network functions like modulation, line coding and bit synchronization, frame synchronization and error detection. Common protocols include the following:
  373.  
  374. 1. Address Resolution Protocol (ARP) - used to convert an IP address into a physical address
  375.  
  376. 2. Neighbor Discovery Protocol (NDP) - protocol in the Internet protocol suite used with Internet Protocol Version 6 (IPv6)
  377.  
  378. 3. [jitter](https://practice.geeksforgeeks.org/problems/what-is-jitter/)
  379.  
  380. 1. It is variation in the time of delivery of packets at the receiver side.
  381. 2. There is uneven delay in the delivery of packets.
  382. 3. This uneven delay effects audio and video delivery, if packets will arrival uneven will lead to poor quality of the audio and video.
  383. 4. For example:- some packets arrive at rate of 3 ms and some 4 ms .This situation is known as jitter.
  384.  
  385. 4. [different OSI layers and their functions.](https://www.imperva.com/learn/application-security/osi-model/)
  386.  
  387. [Explain DOS, DDOS, differences between DOS and DDOS](https://www.geeksforgeeks.org/difference-between-dos-and-ddos-attack/)
  388.  
  389.  
  390. 5. How to prevent DOS attacks on servers?
  391. 5. cloudflare
  392. 6. [Intrusion Detection and Intrusion Prevention](https://www.varonis.com/blog/ids-vs-ips/#:~:text=IPS%3A%20What%20is%20the%20Difference%3F,-Jeff%20Petters&text=Intrusion%20Detection%20Systems%20(IDS)%20analyze,detects%20%E2%80%94%20helping%20stop%20the%20attack.)
  393. 5. [DNS](https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/)
  394.  
  395.  
  396. 7. [DHCP](https://www.geeksforgeeks.org/dynamic-host-configuration-protocol-dhcp/)
  397.  
  398. 7. A DHCP Server is a network server that automatically provides and assigns IP addresses, default gateways and other network parameters to client devices. It relies on the standard protocol known as Dynamic Host Configuration Protocol or DHCP to respond to broadcast queries by clients.
  399.  
  400. 8. [What is the role of Load Balancer? What are the algorithms used in it? How does it handle server failures?](https://www.geeksforgeeks.org/load-balancer-system-design-interview-question/)
  401.  
  402. 9. Linux command to get IP address of all the intermediate nodes in routing, IP address of our node.
  403.  
  404. 8. ping
  405.  
  406. 10. [HTTPS working](https://love2dev.com/blog/how-https-works/#:~:text=The%20HTTPS%20Stack,-HTTPS%20requires%20a&text=An%20SSL%20or%20TLS%20certificate,layer%20security%20it%20becomes%20encrypted.)
  407.  
  408. 11. How to release and allocate new IP addresses to a system.
  409.  
  410. 9. using DHCP
  411.  
  412. 12. How does ping work?
  413.  
  414. 10. The Ping program works much like a sonar echo-location. It sends a small packet of information containing an ICMP ECHO_REQUEST to a specified computer, which then sends an ECHO_REPLY packet in return. The IP address 127.0.0.1 is set by convention to always indicate your own computer. Therefore, a ping to that address will always ping yourself and the delay should be very short.
  415.  
  416. 13. ^^ [traceroute](https://www.youtube.com/watch?v=75yKT3OuE44)
  417.  
  418. 11. uses the time to live parameter in the packet to find the route
  419.  
  420. CDN like akamai
  421.  
  422. 14. 13. mirror sites
  423.  
  424. 15. [How does routing work? ](https://www.youtube.com/watch?v=gQtgtKtvRdo)
  425.  
  426. 14. static
  427.  
  428. 1. breaks if a change happens it breaks
  429. 15. dynamic
  430.  
  431. 16. link state algo
  432.  
  433.  
  434.  
  435. 17. unique packets avoid flooding loops
  436.  
  437. 16. __[Complete working of Router](https://www.youtube.com/watch?v=57U8tV_CTQk)
  438. 17. [TCP congestion control](https://www.geeksforgeeks.org/tcp-congestion-control/)
  439. 18. To avoid congestive collapse, TCP uses a multi-faceted congestion-control strategy. For each connection, TCP maintains a congestion window, limiting the total number of unacknowledged packets that may be in transit end-to-end. This is somewhat analogous to TCP's sliding window used for flow control.
  440. 18. digital signature
  441. 19. [Different topology in networking](https://www.geeksforgeeks.org/types-of-network-topology/)
  442. 19. BUS: if common bus dead, game over. collisions. easy to set up.
  443. 20. RING: easy to set up; hard to diagnose;
  444. 20. TCP handshake
  445. 21. UDP in querying the DNS server
  446. 22. SYN
  447. 23. SYN-ACK
  448. 24. ACK
  449.  
  450.  
  451. ## OOP
  452.  
  453. 1. What are the classes?
  454. 2. Difference between function overloading and overriding
  455. 3. Some basics of inheritance
  456. 4. Virtual functions
  457. 5. design any example that covers all the OOPs concept
  458. 1. *inheritance
  459. 2. *polymorphism
  460. 3. abstraction
  461. 4. encaps
  462.  
  463.  
  464. ## OS
  465.  
  466. 1. [race condition](https://practice.geeksforgeeks.org/problems/what-is-race-condition/)
  467.  
  468. 2. Pros and cons. Different process scheduling algorithms (Round Robin, FCFS, SJF, etc.).
  469.  
  470. 3. How to handle multiple requests at the same time?
  471.  
  472. 1. Two or more processes executing in a system with an illusion of concurrency and accessing shared data, may try to change the shared data at the same time. Since the process scheduling algorithm can swap between processes at any time, we don't actually know the order in which the processes will access the data leading to inconsistencies in the system.This condition in the system is known as race condition.
  473.  
  474. 4. How to handle requests when the server is being updated? (solution using semaphore implementation similar to the classical reader-writer problem and some of its variants)
  475.  
  476. 5. [process vs. thread](https://www.geeksforgeeks.org/difference-between-process-and-thread/)
  477.  
  478. 6. Special kinda problems
  479.  
  480. 2. [Reader-Writer](https://www.youtube.com/watch?v=_vfZhdTgA5A)
  481. 3. [Banker’s Problem](https://www.youtube.com/watch?v=T0FXvTHcYi4)
  482. 4. [Dining Philosophers](https://www.youtube.com/watch?v=NbwbQQB7xNQ)
  483. 5. [Belady’s Anomaly](https://www.geeksforgeeks.org/beladys-anomaly-in-page-replacement-algorithms/)
  484. 1. Bélády’s anomaly is the name given to the phenomenon where increasing the number of page frames results in an increase in the number of page faults for a given memory access pattern.
  485. 2. This phenomenon is commonly experienced in following page replacement algorithms:
  486. 1. First in first out (FIFO)
  487. 2. Second chance algorithm
  488. 3. Random page replacement algorithm
  489.  
  490. 7. [starvation vs aging](https://www.geeksforgeeks.org/starvation-and-aging-in-operating-systems/)
  491.  
  492. 6. Starvation or indefinite blocking is phenomenon associated with the Priority scheduling algorithms, in which a process ready to run for CPU can wait indefinitely because of low priority. In heavily loaded computer system, a steady stream of higher-priority processes can prevent a low-priority process from ever getting the CPU.
  493. 7. Aging is a technique of gradually increasing the priority of processes that wait in the system for a long time.For example, if priority range from 127(low) to 0(high), we could increase the priority of a waiting process by 1 Every 15 minutes.
  494.  
  495. 8. [micro kernel and macro kernel.](https://www.geeksforgeeks.org/monolithic-kernel-and-key-differences-from-microkernel/)
  496.  
  497. 8. Kernel is the core part of an operating system; it manages the system resources. Kernel is like a bridge between application and hardware of the computer
  498.  
  499. What if the different users have different priorities, one needs data quickly even if it’s not updated and another user can wait but needs to be updated data?
  500.  
  501.  
  502. 10. Differences between process and thread, attributes of process in detail, states of a process, different type of schedulers and their functions.
  503.  
  504. 11. ^^ What type of scheduling algorithms that are curently used and differences between different operating systems like windows, linux, macOS, android
  505.  
  506. 12. [dynamic and static memory](https://www.geeksforgeeks.org/difference-between-static-and-dynamic-memory-allocation-in-c/#:~:text=Static%20Memory%20Allocation%20is%20done,is%20done%20during%20program%20execution.&text=In%20static%20memory%20allocation%2C%20once,memory%20size%20can%20be%20changed.)
  507.  
  508. 13. **[fork and exec](https://www.geeksforgeeks.org/difference-fork-exec/)
  509.  
  510. 14. Single User system
  511.  
  512. 15. Find a pattern in a file
  513.  
  514. 9. > grep
  515.  
  516. 16. cat command and how can we use it for input to a file
  517.  
  518. 10. piping and redirection?
  519.  
  520. 17. [raid structure](https://www.geeksforgeeks.org/raid-redundant-arrays-of-independent-disks/)
  521.  
  522. 11. RAID, or “Redundant Arrays of Independent Disks” is a technique which makes use of a combination of multiple disks instead of using a single disk for increased performance, data redundancy or both.
  523.  
  524.  
  525. ## Puzzle
  526.  
  527. 1. *[Ant Puzzle](https://practice.geeksforgeeks.org/problems/ant-puzzle/)
  528. 2. *[fake coin weigh](https://www.geeksforgeeks.org/decision-trees-fake-coin-puzzle/)
  529. 3. *[gold puzzle](http://www.mytechinterviews.com/gold-for-7-days-of-work)
  530. 4. [insect climb and fall](https://brainly.in/question/3346018)
  531. 5. [occurences of the digit 2 from 1 to n](https://www.geeksforgeeks.org/number-of-occurrences-of-2-as-a-digit-in-numbers-from-0-to-n/)
  532. 6. [hour and minute hand ](https://www.geeksforgeeks.org/find-time-hour-minute-hands-superimpose/)
  533. 7. [train equator](http://placementstudy.com/discuss/puzzles/famous-puzzles/74014126#:~:text=Around%20the%20Equator&text=Which%20train%20will%20wear%20out,is%20less%20on%20this%20train.)
  534.  
  535.  
  536. ## Software Engineering
  537.  
  538. 1. [AGILE method](https://practice.geeksforgeeks.org/problems/what-is-agile-methodology/)
  539. 2. [FAQ software testing](https://www.guru99.com/qa-interview-questions-answers.html)
  540. 3. Given a scenario. Design a schema and it’s E-R diagram.
  541. 4. Run into SDE bug. What do?
  542.  
  543.  
  544. 4. 1. Setting up the **requirements criteria**, the requirements of a software should be complete, clear and agreed by all.
  545. 2. The next thing is the **realistic schedule** like time for planning , designing, testing, fixing bugs and re-testing
  546. 3. Adequate **testing**, start the testing immediately after one or more modules development.
  547. 4. Use** rapid prototype during design phase** so that it can be easy for customers to find what to expect
  548. 5. Use of** group communication tools**
  549.  
  550. 5. **SE Design Patterns**
  551.  
  552. 6. RESTful Services
  553.  
  554. Web services based on REST Architecture are known as RESTful web services. These web services use HTTP methods to implement the concept of REST architecture. A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and a set of HTTP Methods.
  555.  
  556. REST architecture treats every content as a resource. These resources can be text files, html pages, images, videos or dynamic business data. REST Server simply provides access to resources and REST client accesses and modifies the resources. Here each resource is identified by URIs/ global IDs.
  557.  
  558.  
  559.  
  560. * PUT write
  561. * POST update
  562. * GET read
  563. * DELETE delete
  564.  
  565. Main difference between POST and GET method is that GET carries request parameters appended in URL string while POST carries request parameters in the message body which makes it a more secure way of transferring data from client to server in http protocol.
  566.  
  567. Caching. Always keep static contents like images, css, JavaScript cacheable, with expiration dates of 2 to 3 days. Never keep expiry dates too high. Dynamic contents should be cached for a few hours only.
  568.  
  569. Remember user specific contents via **cookies**.
  570.  
  571. 1. how do you know your good is code
  572. 1. documentation
  573. 1. docs
  574. 2. comments
  575. 2. good styling
  576. 3. variable names
  577. 4. spaces
  578. 5. follow style guide
  579. 3. fulfil requirements
  580. 4. maintainable
  581. 2. ^^What is an API with examples
  582. 5. An application programming interface, is a computing interface that defines interactions between multiple software intermediaries. It defines the kinds of calls or requests that can be made, how to make them, the data formats that should be used, the conventions to follow
  583. 3. How design iOS app
  584. 6. Swift
  585. 7. XCode
  586. 8. did not get into it due to paywall & personal android device. The Apple Developer Program annual fee is 99 USD.
  587. 4. Testing
  588. 9. [Black and white box](https://www.geeksforgeeks.org/differences-between-black-box-testing-vs-white-box-testing/#:~:text=Black%20Box%20Testing%20is%20a,is%20known%20to%20the%20tester.)
  589. 6. Black Box Testing is a software testing method in which the internal structure/ design/ implementation of the item being tested is not known to the tester
  590. 7. White Box Testing is a software testing method in which the internal structure/ design/ implementation of the item being tested is known to the tester.
  591. 5. SDLC from software engg
  592. 6. JSON
  593. 7. Design pattern
  594.  
  595.  
  596. ## System Design
  597.  
  598. 1. [when you get a lot of requests or more customers USE A LOAD BALANCER](https://www.geeksforgeeks.org/load-balancer-system-design-interview-question/)
  599. 2. schematic to store multiple images in a single file.
  600. 1. zip
  601. 2. 2^8 bits for RGB images. uint have 2^32 bits. can store 4 images using bitwise
  602. 3. database indexing?
  603. 3. ^He then asked me if given transactional data from visa cards how will I detect frauds in the data and how will I handle the large volume of data?
  604. 4. feature engineering
  605. 1. location or IP addresses use
  606. 2. attempts tried
  607. 3. size of transactions
  608. 5. do i have training data, i.e., transactions labelled fraud?
  609. 4. if true can try fitting a model on it
  610. 1.
  611. 5. if false then unsupervised
  612. 4. You have been given unstructured data which is coming from facebook and twitter. Analyse these data according to “TCS stocks in market and people’s view on this”. Make a strategy to tell that your software will decide that any point of time you should “BUY” or “SELL” the stock.
  613. 5. data mining can be done on VISA data? What are the uses?
  614. 6. [LRU cache](https://leetcode.com/problems/lru-cache/discuss/45911/Java-Hashtable-%2B-Double-linked-list-(with-a-touch-of-pseudo-nodes))
  615. 6. constructor(capacity)
  616. 6. intialize capacity of map
  617. 7. initialize count to 0
  618. 8. create DLL head and tail
  619. 7. get(key)
  620. 9. if in map() return val;
  621. 10. else
  622. 2. create map entry
  623. 3. insert to front of DLL
  624. 4. check capacity
  625. 8. put(key, value)
  626. 11. see if exist
  627. 12. capacity check if node !found
  628. 9. helper methods
  629. 13. insert() // insert node at head
  630. 14. remove() // remove a node from any location in DLL
  631. 15. popTail() // used when exceeds capacity
  632. 5. m.erase(key) removes from hash and tail
  633. 16. moveToHead() // if a cache hit
  634. 6. remove Node
  635. 7. insert Node
  636.  
  637. # References
  638.  
  639. 1. [VISA interview prep](https://www.geeksforgeeks.org/visa-interview-preparation/) | [sorted by difficulty](https://www.geeksforgeeks.org/Visa-topics-interview-preparation/)
  640. 2. [VISA question archives](https://www.geeksforgeeks.org/tag/visa/)
  641. 3. ["subjective problems" VISA](https://practice.geeksforgeeks.org/explore/?company%5B%5D=Visa&page=1&company%5B%5D=Visa)
  642. 4. [VISA-dsa session buddy session](https://pastebin.pl/view/ba5c404b)
  643. 5. [g4g SDE theory](https://practice.geeksforgeeks.org/courses/SDE-theory?vC=1)
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement