DEV Community

Sergey Leschev profile picture

Sergey Leschev

Team Lead (Swift, TypeScript, SQL). LeetCode Ranking #Dev TOP 200 Global. Google Engineering Level: L7+

Education

Computer science

Work

System Architect | Team Lead | CTO

LeetCode, Hard (Acceptance 24%, Latest): 2867. Count Valid Paths in a Tree. DFS. O(n). Swift.

LeetCode, Hard (Acceptance 24%, Latest): 2867. Count Valid Paths in a Tree. DFS. O(n). Swift.

12
Comments 1
3 min read

Want to connect with Sergey Leschev?

Create an account to connect with Sergey Leschev. You can also sign in below to proceed if you already have an account.

Already have an account? Sign in
React Custom Hook: useTimeout

React Custom Hook: useTimeout

8
Comments 1
2 min read
React Custom Hook: useStorage

React Custom Hook: useStorage

12
Comments 3
2 min read
React Custom Hook: useStateWithValidation

React Custom Hook: useStateWithValidation

7
Comments 1
2 min read
React Custom Hook: useStateWithHistory

React Custom Hook: useStateWithHistory

11
Comments 1
2 min read
React Custom Hook: useScript

React Custom Hook: useScript

8
Comments
2 min read
React Custom Hook: useRenderCount

React Custom Hook: useRenderCount

6
Comments
2 min read
React Custom Hook: usePrevious

React Custom Hook: usePrevious

6
Comments 4
2 min read
React Custom Hook: useOnScreen

React Custom Hook: useOnScreen

12
Comments 3
2 min read
React Custom Hook: useOnlineStatus

React Custom Hook: useOnlineStatus

8
Comments
2 min read
React Custom Hook: useMediaQuery

React Custom Hook: useMediaQuery

8
Comments
2 min read
React Custom Hook: useLongPress

React Custom Hook: useLongPress

8
Comments
2 min read
React Custom Hook: useHover

React Custom Hook: useHover

17
Comments 16
2 min read
LeetCode, Hard: 2818. Apply Operations to Maximize Score. Swift

LeetCode, Hard: 2818. Apply Operations to Maximize Score. Swift

6
Comments
5 min read
React Custom Hook: useGeolocation

React Custom Hook: useGeolocation

8
Comments
2 min read
React Custom Hook: useFetch

React Custom Hook: useFetch

9
Comments
2 min read
React Custom Hook: useEventListener

React Custom Hook: useEventListener

9
Comments
2 min read
React Custom Hook: useEffectOnce

React Custom Hook: useEffectOnce

8
Comments
2 min read
React Custom Hook: useDeepCompareEffect

React Custom Hook: useDeepCompareEffect

6
Comments
2 min read
React Custom Hook: useDebugInformation

React Custom Hook: useDebugInformation

7
Comments
2 min read
React Custom Hook: useDebounce

React Custom Hook: useDebounce

11
Comments 2
2 min read
LeetCode, Hard, last two problems: 2809. Min Time to Make Array Sum At Most x & 2813. Max Elegance of a K-Length Subseq.

LeetCode, Hard, last two problems: 2809. Min Time to Make Array Sum At Most x & 2813. Max Elegance of a K-Length Subseq.

7
Comments 2
4 min read
React Custom Hook: useDarkMode

React Custom Hook: useDarkMode

14
Comments 4
2 min read
React Custom Hook: useCopyToClipboard

React Custom Hook: useCopyToClipboard

10
Comments
2 min read
React Custom Hook: useCookie

React Custom Hook: useCookie

23
Comments 5
3 min read
React Custom Hook: useClickOutside

React Custom Hook: useClickOutside

10
Comments 4
2 min read
React Custom Hook: useAsync

React Custom Hook: useAsync

13
Comments 2
2 min read
React Custom Hook: useArray

React Custom Hook: useArray

27
Comments 11
2 min read
LeetCode 2532 (Hard++, Extra Category, Amazon). Time to Cross a Bridge.

LeetCode 2532 (Hard++, Extra Category, Amazon). Time to Cross a Bridge.

7
Comments 4
6 min read
iOS Dev Skills. Performance Review.

iOS Dev Skills. Performance Review.

7
Comments
4 min read
LeetCode 2801 (Hard, Acceptance Level 14.5%). Count Stepping Numbers in Range. DP. Efficiently handles large inputs (10^9 + 7).

LeetCode 2801 (Hard, Acceptance Level 14.5%). Count Stepping Numbers in Range. DP. Efficiently handles large inputs (10^9 + 7).

7
Comments 2
4 min read
LeetCode 2790 (Hard). Maximum Number of Groups With Increasing Length. O(NlogN). Math. Only 10 lines of code.

LeetCode 2790 (Hard). Maximum Number of Groups With Increasing Length. O(NlogN). Math. Only 10 lines of code.

5
Comments
4 min read
LeetCode 2612 (Hard). Minimum Reverse Operations. Swift. BFS. O(n+k). O(n).

LeetCode 2612 (Hard). Minimum Reverse Operations. Swift. BFS. O(n+k). O(n).

8
Comments
4 min read
LeetCode 956 (Hard). Solution of the day. Tallest Billboard. Swift. DP.

LeetCode 956 (Hard). Solution of the day. Tallest Billboard. Swift. DP.

6
Comments 1
3 min read
Boosting Your Terminal Productivity: Shell GPT.

Boosting Your Terminal Productivity: Shell GPT.

14
Comments 7
1 min read
LeetCode: 211. Design Add and Search Words Data Structure (and others)

LeetCode: 211. Design Add and Search Words Data Structure (and others)

5
Comments
1 min read
Redux-like state container in SwiftUI: Connectors.

Redux-like state container in SwiftUI: Connectors.

6
Comments
5 min read
Using Container Views with Redux-like state container

Using Container Views with Redux-like state container

6
Comments 2
2 min read
Redux-like state container in SwiftUI. Container Views.

Redux-like state container in SwiftUI. Container Views.

6
Comments
2 min read
Redux-like state container in SwiftUI. Derived stores.

Redux-like state container in SwiftUI. Derived stores.

8
Comments
2 min read
Redux-like state container in SwiftUI. Reducer composition.

Redux-like state container in SwiftUI. Reducer composition.

8
Comments
2 min read
Redux-like state container in SwiftUI. State composition.

Redux-like state container in SwiftUI. State composition.

6
Comments
2 min read
Redux-like state container in SwiftUI. State normalization.

Redux-like state container in SwiftUI. State normalization.

8
Comments
2 min read
Redux-like state container in SwiftUI. Usage.

Redux-like state container in SwiftUI. Usage.

6
Comments
2 min read
Redux-like state container in SwiftUI. Side effects.

Redux-like state container in SwiftUI. Side effects.

6
Comments 2
2 min read
Redux-like state container in SwiftUI. Unidirectional flow.

Redux-like state container in SwiftUI. Unidirectional flow.

6
Comments
2 min read
Redux-like state container in SwiftUI. Reducer and Actions.

Redux-like state container in SwiftUI. Reducer and Actions.

5
Comments
2 min read
Redux-like state container in SwiftUI. Basics.

Redux-like state container in SwiftUI. Basics.

5
Comments
2 min read
SwiftUI & ChatGPT. The world is changing. Again.

SwiftUI & ChatGPT. The world is changing. Again.

6
Comments
5 min read
Swift 5.7: Regex. Shorthands for optional unwrapping. Unlock existentials for all protocols.

Swift 5.7: Regex. Shorthands for optional unwrapping. Unlock existentials for all protocols.

10
Comments 1
2 min read
Swift: Conforming a protocol to a protocol.

Swift: Conforming a protocol to a protocol.

5
Comments
2 min read
Swift: Associated types. Constraints.

Swift: Associated types. Constraints.

6
Comments
2 min read
Swift: Associated types. Example.

Swift: Associated types. Example.

5
Comments
2 min read
Swift: Associated types. Declaration.

Swift: Associated types. Declaration.

5
Comments
2 min read
Swift: Associated types.

Swift: Associated types.

5
Comments
2 min read
Array of weak in Swift.

Array of weak in Swift.

7
Comments
3 min read
KeyPath in Swift: Usage.

KeyPath in Swift: Usage.

5
Comments
5 min read
Types of KeyPath in Swift.

Types of KeyPath in Swift.

7
Comments
3 min read
KeyPath in Swift: Syntax.

KeyPath in Swift: Syntax.

8
Comments
3 min read
AnyObject, Any, any: any.

AnyObject, Any, any: any.

7
Comments
2 min read
loading...