## Optimized way to Reverse a String | Leetcode Challenge #344

Problem Statement Write a function that reverse a string. Input string will be given as an array of characters char[]. Can you to it without allocating extra space for another array? Hint: You must do this by modifying the input array in-place with O(1) extra

## Longest Repeated Substring Problem | Longest Duplicate Substring Problem with Code

Longest repeated substring problem is a problem of finding the longest substring that occurs at least twice in a given string. This is also one of the important interview questions. Problem Statement Given a string S, consider all duplicated substrings: (contiguous) substrings of S that occur more than once.  (The

## A Complete Guide on List Slicing and slice() Method of Python

Slicing is extraction of a part of a sequence like list, tuple, string. It can fetch multiple elements with a single statement. It does not remove the values from the iterable; instead makes a new object with the desired elements. Syntax start – Starting integer where

## How to Get Index of an Element in Python List

The index() method is used to find the position of a particular element in the Python List. Since it is a method of list class, it’s called using a .(dot) operator on list. It checks every element from the starting of the list until it

## How to Type Fraction in Word: Tips and Tricks to Write Fractions

You might have noticed some times Microsoft Word automatically converts text into required fraction you need. But for most of the case, Word doesn’t do this magical conversion. It happens because, Ms Word has autocorrect feature enabled by default that convert commonly used fractions like

## List Comprehension In Python

Python is famous for its elegant coding style that is concise, easy to write and almost as easy to read as plain English. List comprehension in python is one of the distinctive feature which provides a powerful functionality within a single line of code. It’s

## Web Scraping using Python: Tutorial on how to extract data from website using Python

What is Web Scraping? In simple words, Web Scraping is an extraction of data from a website. For example, some websites contains an extensive amount of invaluable data like stock prices, product’s details and sports stats, so if you want to access their information, either

## Kadane algorithm for Maximum sum subarray problem: Java, Python and C++ code of Kadane algorithm

Kadane algorithm is the fastest and optimized algorithm of Maximum Sum Subarray problem. Maximum sum subarray is the contiguous subarray within a given one dimension array with the largest sum. This problem is one of the classical interview questions in IT companies like Google, Apple,

## 3 Methods to Add Elements to List in Python || Append vs Extend vs Insert methods of Python

Understanding List is one of the most important thing for anyone who just started coding in Python. You may need to add an element to the list whether at the end or somewhere in between. Although it can be done manually with few lists of

## Insert Method in Python

The insert() method inserts an element to the list at a given index. The index() method searches for an element in the list and returns its index. Syntax of Insert() Method  list.insert(index, element) Insert() Parameters This method takes two parameter index where an element needs to be inserted