This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace LowestCommonAncestorWithParent | |
{ | |
class Program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace csvReader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace csvReader | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//We have a binary matrix conatining only 0 & 1, find the larget conected area of 1 if we can convert | |
// exactly 1 zero into 1 in the matrix. | |
//You can travel up down lwft and right. | |
//3 3 (5) 2 | |
//0 3 0 2 | |
//ans == 6 | |
// 0, 1, - 1 island node | |
Var map = new Dictionary< int, int>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int LongestLine(int[][] M) { | |
if(M == null || M.Length == 0 || M[0].Length == 0) | |
{ | |
return 0; | |
} | |
var rows = M.Length; | |
var columns = M[0].Length; | |
var dpH = new int[rows][]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Solution { | |
/// <summary> | |
/// Nov. 19, 2020 | |
/// study code | |
/// https://leetcode.com/problems/sentence-similarity-ii/solution/ | |
/// Time Complexity: O(NP), where N is the maximum length of words1 and words2, | |
/// and P is the length of pairs. Each of N searches could search the entire graph. | |
/// </summary> | |
/// <param name="words1"></param> | |
/// <param name="words2"></param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = require('lodash'); | |
function sayHello() { | |
console.log('Hello, World'); | |
} | |
_.times(5, sayHello); | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Solution { | |
public bool CloseStrings(string word1, string word2) { | |
if(word1.Length != word2.Length) | |
return false; | |
var map = new int[26]; | |
for(int i = 0; i < 26; i++) | |
{ | |
map[i] = -1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problem statement: | |
Given a string S and a string t , find the minimum window substring in S which contains all the characters of the string T in the same order. | |
import java.io.*; | |
import java.util.*; | |
class Solution { | |
public static void main(String[] args) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words. | |
Note: | |
The same word in the dictionary may be reused multiple times in the segmentation. | |
You may assume the dictionary does not contain duplicate words. | |
Example 1: | |
Input: s = "leetcode", wordDict = ["leet", "code"] |