Category: DIY & Household Repairs

Practical DIY repair guides and household fixes to help you mend electronics, tools, wiring, and everyday home items safely.

  • Google Interview 686. Repeated String Match

    Google Interview 686. Repeated String Match

    Given two strings a and b, return the minimum number of times you should repeat string a so that string b becomes a subscring of sring a.If b cannot be a substring of a after repeating it, return -1.

  • Google 844. Backspace String Compare

    Google 844. Backspace String Compare

    Given two strings s and t, return True if they are equal. ‘#’ means backspace. Solution 1: use a list to implement a stack. append adds an item and pop removes it.

  • Two Sum Solution [LeetCode 1]

    Two Sum Solution [LeetCode 1]

    Given an array of integers nums and a target integer. Return the indexes (not values) of the 2 numbers that add up to the target value. One solution and one element can’t be used twice.

  • LeetCode 482 License Key Formatting Solution

    LeetCode 482 License Key Formatting Solution

    LeetCode 482 Solution 32 ms in Python 3 You are given a license key represented by the string s that contains only alphanumeric characters and dashes. You are also given an integer k.

  • Google  Leetcode 929 Unique Email Addresses

    Google Leetcode 929 Unique Email Addresses

    This solution uses the Slice in Python to slice the string as needed and a List to store unique emails found. One major trick is to use email[i:] and not just email[i]

  • How to reverse a string in Python 3

    How to reverse a string in Python 3

    Write [::-1] to do slicing in Python starting at first character, until last, step by 1 in reverse (-1). It’s a pretty nice way to impress your imaginary friends.

  • How to reverse integer in Python 3

    In Python 3 int type is the same as long so there is no need to check for int overflow. In other cases you will have to check for integer max value and min value to avoid a stack overflow.

  • Find the missing number in an array

    Find the missing number in an array

    Computer science job interview question:Find the missing number in the series.Write a program to calculate the missing number in the series of integers.

  • Rocky Linux vs Centos vs Oracle Linux

    Rocky Linux vs Centos vs Oracle Linux

    Since Centos 8 and Centos Stream came out, I’ve been looking for an alternative Linux operating system for our small web-server. The OS could be Debian based but I would prefer it if it’s RHEL based since I’m used to that.

  • Clean C Drive on Windows 10

    Clean C Drive on Windows 10

    There are a few ways to remove unwanted old files from your PC.This also will make your PC faster. Before deleting any files make sure you don’t need them as they will be gone. Always make a backup of your important files before making changes to your.