- Dynamic Programming
Dynamic programming is similar to Divide and Conquer in in that a problem is broken down into smaller sub-problems. But unlike, Divide and Conquer, these sub-problems are not solved independently. Rather, results of these smaller sub-problems are stored and used for similar or overlapping…
- MySQL Reset Root Password
Stop MySQL server sudo systemctl stop mysql // OR /etc/init.d/mysql stop Start MySQL server without loading grant table The ampersand & at the end of the command above will cause the program to run in the background, so you can continue to use the shell. When the –skip-grant-tables option is used,…
- Recursion
Recursion is the technique of making a function call to itself. This technique provides a way to break complicated problems down into simple problems which are easier to solve. Recursion Structure validation of input base case where it stops calling itself and returns a value recursive case,…
- MySQL interview – Advanced Queries
MySQL Advanced Queries 1.a Write a query to find the top 3 highest salaries in the company. SELECT salary FROM employee ORDER BY salary DESC LIMIT 3; 1.b Write a query to find the top 3 highest salary employees in the company. SELECT * FROM employee ORDER BY salary DESC LIMIT 3; 1.c Write a […]
- MySQL interview – Fundamentals
MySQL Fundamental Questions 1. What is a database? A database is an organized collection of data. It stores data in a way that data can be easily accessed and maintained. It has tables that contain rows and columns. Example: School Management Database, Bank Management Database, etc. 2. What is…