code4learning's profile picture. Code Snippets 4 learning

Code 4 Learning

@code4learning

Code Snippets 4 learning

مثبتة

Binary Tree Inorder traversal without recursion


Validate Binary Search Tree using Inorder Traversal

code4learning's tweet image. Validate Binary Search Tree using Inorder Traversal

Binary Tree PostOrder traversal

code4learning's tweet image. Binary Tree PostOrder traversal

Recursion makes Binary tree problems a lot easier. The real challenge is doing without recursion


Binary Tree Level Order Traversal

code4learning's tweet image. Binary Tree Level Order Traversal

Code 4 Learning أعاد

Binary Tree Inorder traversal without recursion


Code 4 Learning أعاد

Square root of a number using binary search

code4learning's tweet image. Square root of a number using binary search

Code 4 Learning أعاد

LeetCode 191. Number of 1 Bits Input: n = 00000000000000000000000000001011 Output: 3 Using Java logical operator (>>>) : 10001 >>> 1 => 01000 Two Steps: 1) & with 1 2) Shift bit by one using >>>

code4learning's tweet image. LeetCode 191. Number of 1 Bits
Input: n = 00000000000000000000000000001011
Output: 3

Using Java logical operator (>>>) : 
10001 >>> 1 => 01000

Two Steps:
1) & with 1
2) Shift bit by one using >>>

Code 4 Learning أعاد

Binary Search: Search in a sorted array in log(n) time.

code4learning's tweet image. Binary Search: Search in a sorted array in log(n) time.

United States الاتجاهات

Loading...

Something went wrong.


Something went wrong.