Posts

Valid Word Abbreviation Leetcode solution using JAVA language

 Valid word abbreviation problem will be solved by using 2 pointer approach, it has certain limitations: - abbreviation must not contain leading zeros    - example:  word: laughing out loud abbr: l07outl  explanation: because of 0 before 7 it's not valid abbreviation, why? due to the start of the digits in abbr with zero, which is called leading zero. - adjacent substrings in the abbreviation is not accepted   - example:  word: as soon as possible abbr: a42e explanation: soon and as are adjaced substring, and abbreviation of soon and as is 42 collectively, which is not allowed. - replacing an empty substring is not allowed   - example: word: abbreviation abbr: a0bbreviation explanation: zero between a and b is a replacement of empty substring which is not allowed Solution approach: - we will take two pointers (i and j), and i will be pointing to the start of the "word" and j will be pointing to the start of the "abbreviation" - ...

Kubernetes terms made easy

when we have docker compose and we can define rules to run our containerized applications over there ... so why do we need k8s...? Well we can certainly manage very small containers... but handling large scale applications through this will certainly be a nightmare... Because ... large apps will need to scale automatically.. and docker compose requires manual intervention and scripting .. ahhh who will re invent the wheel... Let's k8s do this... Now when we know the importance of k8s .. we have to learn it's core components and it's architecture level working... k8$ environment have a company named ... control pane .. who is responsible for managing and running kubernetes clusters ....  This company, named control pane.. have a CEO.. named, API Server ...I wasn't talking about the actual CEO of kubernetes 😅... just an analogy... Every one discuss there matters with API server ... and api server talks to everyone ... It's kind of a brain of the company...  Next come...

Anomalies in Database

Anomaly is a fault which occurs in the poorly designed database , which leads to inconsistent, redundant and inefficient data. There are three kind of anomalies: - Insertion anomaly - Updation anomaly - Deletion anomaly Insertion Anomaly It occurs when we want to insert a particular kind of data, let's say Data#1, but due to the absence of a certain data, let's say Data#2, we were unable to add. Example If we have only one table for saving student and course, named std_course. We won't be able to add the new course until, we have the student information. std_course Table  Student_ID Student_Name Course Instructor Instructor_Contact 101 Ali DBMS Mr. Khan 123456789 102 Ahmed OS Mr. Ahsan 987654321 Suppos...

continue vs break keyword in JAVA

in the loop continue is used to skip the current iteration, and break is used to terminate the loop.