Find a Middle of the Linked List – Geekfrisk
In the following article, we are going to check how to find the middle of the Linked List Given the head of a singly linked list, return the… Read More »Find a Middle of the Linked List – Geekfrisk
In the following article, we are going to check how to find the middle of the Linked List Given the head of a singly linked list, return the… Read More »Find a Middle of the Linked List – Geekfrisk
Given a square matrix, return the sum of the matrix diagonals. Only include the sum of all the elements on the primary diagonal and all the elements… Read More »Matrix Diagonal Sum in Java, C# and python
Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence of a string is a new string that is formed from the original string by deleting some (can be… Read More »Is Subsequence – Coding program
Given a binary array nums, return the maximum number of consecutive 1‘s in the array. Example 1: Input: nums = [1,1,0,1,1,1] Output: 3 Explanation: The first two digits… Read More »Max Consecutive Ones – C# Program
Given an array nums of integers, return how many of them contain an even number of digits. Input: nums = [12,345,2,6,7896] Output: 2 Explanation: 12 contains 2 digits (even… Read More »Find Numbers with Even Number of Digits
Find the length of the last word present in the sentence Step 1: Remove the extra spaces from the string Use inbuilt Trim() function to… Read More »Length of Last Word – C-Sharp Program
Problem: Input: nums = [1,2,3,4] Output: [1,3,6,10] Explanation: Running sum is obtained as follows: [1, 1+2, 1+2+3, 1+2+3+4]. Solution 1: Solution 2: The simple and… Read More »Running Sum of 1d Array – C# Program