-
8 Patterns Review For Successful Coding Interview
8 Patterns Review For Successful Coding Interview This is nothing but quick 5 min revision before going to interview. Visit https: https://codeandalgo.com for more such contents
-
Reverse Linked List II
Leetcode#92 Reverse Linked List II This question came in Arista technical interview.. Logic From Pen and Paper Golang Code Attempt-1 Golang Code Attempt-2 Better Version Output Please visit https: https://codeandalgo.com for more such contents
-
Sorting
Quick Sort
-
Synchronisation in Golang
Mutex Output Channel Workers Processing Tasks (Incrementing Numbers) Output Negative cases if we do not close the channel at the end, we will seen traceback.
-
For loop Patterns
Pattern 1 Iterating over array n times Pattern 2 Printing staircase patterns Pattern 3 Printing all Subarray Pattern 4 Iterating over all Subarray and printing Sum, lengths Please visit https: https://codeandalgo.com for more such contents
-
Max Consecutive Ones III
Leetcode#1004 Max Consecutive Ones III Problem Statement Given a binary array nums and an integer k, return the maximum number of consecutive 1‘s in the array if you can flip at most k 0‘s. Example 1: Input: nums = [1,1,1,0,0,0,1,1,1,1,0], k = 2 Output: 6 Explanation: [1,1,1,0,0,1,1,1,1,1,1] Bolded numbers were flipped from 0 to 1. The longest subarray is underlined. Example 2:…
-
Maximum Number of Vowels in a Substring of Given Length
Leetcode#1456 Maximum Number of Vowels in a Substring of Given Length Problem Statement Given a string s and an integer k, return the maximum number of vowel letters in any substring of s with length k. Vowel letters in English are ‘a’, ‘e’, ‘i’, ‘o’, and ‘u’. Example 1: Input: s = “abciiidef”, k = 3 Output: 3 Explanation: The substring “iii” contains 3 vowel letters. Example 2:…