by Suf | Mar 3, 2022 | C++, Programming, Tips
Reversing a string means changing the order of the characters in it, such that it reads backwards. There are several ways to reverse a string in C++. This tutorial will go through the methods for reversing a string in C++ with the help of code examples. Table of...
by Suf | Mar 2, 2022 | DSA, Programming, Rust, Tips
Bubble sort is a popular sorting algorithm that compares the adjacent elements in a list and swaps them if they are not in the specified order. This tutorial will explain how to implement the bubble sort algorithm in Rust using code examples. Table of contentsHow...
by Suf | Mar 2, 2022 | C++, Programming, Tips
A C++ string variable contains a collection of characters surrounded by double-quotes. There are two types of strings used in C++. C-strings, which are arrays of type char terminated by the null character \0.Strings that are objects of the Standard C++ Library string...
by Suf | Mar 1, 2022 | Programming, Python, Tips
If you try to call a float as if it were a function, you will raise the error “TypeError: ‘float’ object is not callable”. To solve this error, ensure you use operators between terms in mathematical operations and that you do not name any...
by Suf | Mar 1, 2022 | Programming, Python, Tips
In Python, Strings are arrays of bytes representing Unicode characters. Although Strings are container type objects, like lists, you cannot append to a string. If you try to call the append() method on a string to add more characters, you will raise the error...
by Suf | Feb 28, 2022 | Programming, Python, Tips
If you try to call a tuple object, you will raise the error “TypeError: ‘tuple’ object is not callable”. We use parentheses to define tuples, but if you define multiple tuples without separating them with commas, Python will interpret this as...