Posts

Understanding Object-Oriented Programming in C++

Image
Understanding Object-Oriented Programming in C++ Introduction: Object-oriented programming (OOP) is a powerful paradigm that revolutionized the way we write software. With its emphasis on encapsulation, inheritance, and polymorphism, OOP enables developers to create modular, reusable, and maintainable code. In this blog post, we will explore the fundamentals of OOP in C++, one of the most popular programming languages for building robust and efficient applications. Objects and Classes: At the heart of OOP in C++ are objects and classes. An object is a real-world entity with its own state and behavior, while a class serves as a blueprint for creating objects. In C++, classes are defined using the class keyword and can contain data members (variables) and member functions (methods). By instantiating a class, we create an object that possesses the properties and behaviors defined within the class. Encapsulation: Encapsulation is the principle of bundling data and methods within a c...

Java programming Language

 * **Introduction**     * Introduce the topic of Java programming and why it is a popular language.     * Discuss the benefits of learning Java, such as its versatility, portability, and security. * **What is Java?**     * Provide a brief overview of Java, including its history, features, and syntax. * **Why learn Java?**     * Discuss the benefits of learning Java, such as its versatility, portability, and security. * **Where to learn Java**     * Provide a list of resources for learning Java, including online tutorials, books, and courses. * **Getting started with Java**     * Provide a step-by-step guide to getting started with Java, including installing the Java Development Kit (JDK) and writing your first Java program. * **Java projects**     * Suggest some Java projects that you can work on to learn the language and build your skills. * **Conclusion**     * Summarize the benefits of learning Java ...

Good things of Competitive programming

 Good things of Competitive programming Competitive programming is a fun and rewarding activity that challenges your logical thinking, problem-solving skills and coding abilities. It is also a great way to learn new algorithms, data structures and programming languages. In this blog post, I will share some of the good things of competitive programming that I have experienced and enjoyed. One of the good things of competitive programming is that it helps you improve your coding skills. By participating in contests, you get to practice writing efficient, elegant and bug-free code under time pressure and with limited resources. You also get to learn from other programmers who may have different approaches or solutions to the same problem. This can help you broaden your perspective and discover new tricks and techniques. Another good thing of competitive programming is that it boosts your confidence and motivation. When you solve a hard problem or rank high in a contest, you feel a sen...

JavaScript Dot notation and Bracket notation

 JavaScript Dot notation and Bracket notation In this blog post, I will explain the difference between dot notation and bracket notation in JavaScript, and when to use each one. Dot notation and bracket notation are two ways of accessing properties of an object in JavaScript. An object is a collection of key-value pairs, where each key is a string and each value can be any type of data. Dot notation is the most common and concise way of accessing properties of an object. It uses a dot (.) followed by the name of the property. For example, if we have an object called person with a name property, we can access it using dot notation like this: console.log(person.name); // prints "John" Bracket notation is another way of accessing properties of an object. It uses square brackets ([]) with the name of the property as a string inside them. For example, we can access the name property of the person object using bracket notation like this: console.log(person["name"]); // pr...

Strict mode in JavaScript programming

Strict mode in JavaScript   Strict mode in JavaScript is a way to enforce stricter rules and restrictions when writing JavaScript code, which can help identify and prevent potential errors, security leaks, or performance issues. It is enabled by adding the following line at the beginning of a script or a function: "use strict"; When strict mode is enabled, the JavaScript interpreter will throw errors or disallow certain actions that are allowed in non-strict mode. Some examples of changes in strict mode include: 1. Variables must be declared with var , let , or const before being used, otherwise an error is thrown. Non-strict mode: x = 10; // No error, even though 'x' is not declared console.log(x); // 10 Strict mode: "use strict"; x = 10; // Error: x is not defined console.log(x); 2. Assigning a value to an undeclared variable, read-only property, or non-writable global variable will throw an error. Non-strict mode: NaN = "not a number"; /...

Way Too Long Words - Codeforces problem solution

 Way Too Long Words - Codeforces problem solution  A. Way Too Long Words Sometimes some words like "localization" or "internationalization" are so long that writing them many times in one text is quite tiresome. Let's consider a word too long, if its length is strictly more than 10 characters. All too long words should be replaced with a special abbreviation. This abbreviation is made like this: we write down the first and the last letter of a word and between them we write the number of letters between the first and the last letters. That number is in decimal system and doesn't contain any leading zeroes. Thus, "localization" will be spelt as "l10n", and "internationalization» will be spelt as "i18n". You are suggested to automatize the process of changing the words with abbreviations. At that all too long words should be replaced by the abbreviation and the words that are not too long should not undergo any changes. Input...

University Questions - 1st semester

Image
City University, Bangladesh  1st Semester Question Mid-term CSE 111 ENG 101 PHY 101 Final ENG 201 PHY 201 CSE 112

Way Too Long Words - Codeforces problem solution

Way Too Long Words - Codeforces problem solution   A. Way Too Long Words Sometimes some words like " localization " or " internationalization " are so long that writing them many times in one text is quite tiresome. Let's consider a word  too long , if its length is  strictly more  than  10  characters. All too long words should be replaced with a special abbreviation. This abbreviation is made like this: we write down the first and the last letter of a word and between them we write the number of letters between the first and the last letters. That number is in decimal system and doesn't contain any leading zeroes. Thus, " localization " will be spelt as " l10n ", and " internationalization » will be spelt as " i18n ". You are suggested to automatize the process of changing the words with abbreviations. At that all too long words should be replaced by the abbreviation and the words that are not too long should not undergo ...

[GYM] 100 Easy Problems (Bootcamp)

  [GYM] 100 Easy Problems (Bootcamp) Target audience: newbies and pupils (rating up to 1400). Group link:  https://codeforces.com/group/yg7WhsFsAp/contests  (hit "join" on the right). Hi. Enjoy a series of 8 problem lists for beginners. The example topics are strings, arrays, math, and binary search. You are allowed to discuss anything with others, or just look up solutions online. There are also 3 exams, each recommended for a 2-hour individual virtual participation. Use the displayed order, e.g. take exam 1 after day 3. It all should take you 2 weeks of intense bootcamp-like work (or a few months if you take your time). The problems were originally used two years ago in a Saudi Arabia camp. It's a mix of around 70 existing CF problems and 30 new original problems, mainly prepared by  kostka , with some help from me and  mustafabar . I asked them for permission to publish everything. I will put hints to some problems in this blog (or in the group? not sure). Ex...

Popular posts from this blog

Callback function in JavaScript

Bitwise Operators in C/C++

Using Generic in TypeScript about types in the Code