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
#ODB Files Location | |
$binFolder = "C:\Projects\.net 2.0\build\bin" | |
$gacFolder = "%SYSTEMROOT%\Assembly\GAC_MSIL" | |
set-location $binFolder | |
$pdbfiles = get-childitem | where {$_.name.EndsWith("pdb")} | |
foreach ($pdb in $pdbfiles) | |
{ | |
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
package Helpers | |
type Queue struct { | |
q []int32 | |
} | |
func (q *Queue) push(v int32) { | |
q.q = append(q.q, v) | |
} |
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
b := []byte("9856743210") | |
fmt.Println("Before:", string(b)) | |
sort.Slice(b, func(i, j int) bool { | |
return b[i] < b[j] | |
}) | |
fmt.Println("After:", string(b)) |
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
// Following implemetation of Stack tie each element to it parent | |
type stackElement struct { | |
data interface{} | |
next *stackElement | |
} | |
type Stack struct { | |
Size int32 | |
head *stackElement |
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
package DataStuctures | |
import ( | |
"testing" | |
) | |
type MinHeap struct { | |
heap []int32 | |
} |
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
package DataStuctures | |
import ( | |
"testing" | |
) | |
type MaxHeap struct { | |
heap []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
package Google | |
import "testing" | |
// Find max number of connected colors in grid | |
// https://proglib.io/p/google-interview-task/?fbclid=IwAR2PXn_XqXQx97U3FLSFssVfDa1-m2P-T3yAJELEJoOWpNfcQjfyesOegpY | |
type si struct { | |
r int | |
c 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
/* | |
First Common Ancestor: Design an algorithm and write code to find the first common ancestor of two nodes in a binary tree. | |
Avoid storing additional nodes in a data structure. | |
NOTE: This is not necessarily a binary search tree. | |
Hints: # 10, #16, #28, #36, #46, #70, #80, #96 | |
*/ | |
/* | |
Создайте алгоритм и напишите код поиска первого общего предка двух узлов бинарного дерева. Постарайтесь избежать | |
хранения дополнительных узлов в структуре данных. |
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
package Part_4 | |
import ( | |
"fmt" | |
"testing" | |
) | |
/* | |
BST Sequences: A binary search tree was created by traversing through an array from left to right and inserting each element. | |
Given a binary search tree with distinct elements, print all possible arrays that could have led to this tree. |
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
package Part_4 | |
import ( | |
"testing" | |
) | |
/* | |
Paths with Sum: You are given a binary tree in which each node contains an integer value (which might be positive or negative). | |
Design an algorithm to count the number of paths that sum to a given value. |
OlderNewer