Coding interview preparation
5.82K subscribers
459 photos
80 files
164 links
Download Telegram
8 Popular Network Protocols Explained in 1 Simple Diagram
You're giving an interview, and the interviewer asks,

What is the difference between CHAR and VARCHAR2 datatype in SQL?


Here's how you can answer:

Sample Answer:

CHAR and VARCHAR2 are both used to store text in SQL, but they work differently. CHAR is fixed-length, meaning it always uses the same amount of space no matter how short the text is. For example, if you set a column to CHAR(10) and store ‘Hi’, it will still take up 10 spaces, adding extra padding to fill the space. This can waste storage but is consistent in size.

VARCHAR2, on the other hand, is variable-length, so it only uses as much space as needed for the text. If you set a column to VARCHAR2(10) and store ‘Hi’, it only takes 2 spaces plus a little extra to store the length, saving space.

Use CHAR when your data is always the same length, like codes or short identifiers. Use VARCHAR2 when your data varies in length, like names or descriptions. CHAR can be slightly faster for fixed-length data, but VARCHAR2 is more efficient for saving space and handling different text lengths.
3
How Does HTTPS Work?
10 Types of API Testing
2
Big Data Pipelines on the Cloud
Session, JWT, SSO, and OAuth 2.0 in One Diagram
Key Database Sharding Concepts
API Security 101
Top 50 JavaScript Interview Questions 💻

1. What are the key features of JavaScript? 
2. Difference between var, let, and const 
3. What is hoisting? 
4. Explain closures with an example 
5. What is the difference between == and ===? 
6. What is event bubbling and capturing? 
7. What is the DOM? 
8. Difference between null and undefined 
9. What are arrow functions? 
10. Explain callback functions 
11. What is a promise in JS? 
12. Explain async/await 
13. What is the difference between call, apply, and bind? 
14. What is a prototype? 
15. What is prototypal inheritance? 
16. What is the use of ‘this’ keyword in JS? 
17. Explain the concept of scope in JS 
18. What is lexical scope? 
19. What are higher-order functions? 
20. What is a pure function? 
21. What is the event loop in JS? 
22. Explain microtask vs. macrotask queue 
23. What is JSON and how is it used? 
24. What are IIFEs (Immediately Invoked Function Expressions)? 
25. What is the difference between synchronous and asynchronous code? 
26. How does JavaScript handle memory management? 
27. What is a JavaScript engine? 
28. Difference between deep copy and shallow copy in JS 
29. What is destructuring in ES6? 
30. What is a spread operator? 
31. What is a rest parameter?
32. What are template literals? 
33. What is a module in JS? 
34. Difference between default export and named export 
35. How do you handle errors in JavaScript? 
36. What is the use of try...catch? 
37. What is a service worker? 
38. What is localStorage vs. sessionStorage? 
39. What is debounce and throttle? 
40. Explain the fetch API 
41. What are async generators? 
42. How to create and dispatch custom events? 
43. What is CORS in JS? 
44. What is memory leak and how to prevent it in JS? 
45. How do arrow functions differ from regular functions? 
46. What are Map and Set in JavaScript? 
47. Explain WeakMap and WeakSet 
48. What are symbols in JS? 
49. What is functional programming in JS? 
50. How do you debug JavaScript code?

💬 Tap ❤️ for detailed answers!
1