Sunday, September 30, 2018

Organized Topics for Coding Skills

Big O Notation

Construction of Loops
Establishing Initial Conditions for Loops
Finding the Iterative Construct
Termination of Loops
Iteration Trace Table
Iterative Program Structure
While Loop Structure
For Loop Structure
For Loop Examples
Comparison: Loops vs Recursive Functions

Divide-and-Conquer
Recursion : Algorithmically, Semantically
How to Code Recursively
Stack Overflow Example
Compute a to the power b
Induction and Recursion

Summation Algorithm
Add a sequence of numbers
Recursion
Iteration
Recursive Sum

Multiplication
Iterative Solution
Recursive Solution

Division without divide operator
Trace : Desk Check a solution
Non-Linear Recursion

Factorial
Recursive Solution
Optimized Solution
Factorial Call Stack
Factorial Algorithm
Factorial Implementation

Compute a to the power b
Recursion Solution
Iterative Solution

Compute a % b
Iterative Solution
Efficient Solution

Fibonacci : Multiple Bases Cases - Recursion
Efficient Fibonacci
Fibonacci Runtime
Fibonacci Number Efficiency
Fibonacci Iterative Solution

Dynamic Programming

Square Root Desk Check Table
Binary Recursion
Even Number
Square Root
Linear Recursion

Exponentiation Function
Factorial C
Array C
Binary Search C
Reverse String C
Sum the Digits

Find Repeating Elements
Identical
Unique Characters
Unique Characters with Constraints
Duplicate Elements in Array
Recognize Non-Linear Recursion
Add Adjacent Elements
Runtimes + , *
Powers of 2 from 1 through n
Remove White Spaces
Remove Duplicates in a String
String Segmentation
Palindrome
Palindrome Substrings Diagrams
Palindrome

Tuesday, September 25, 2018

How to override merge conflict

To use the latest git version of the file. We can replace file that has conflict with the latest from repo by running these commands:

git reset -- path/to/file.ext


git checkout path/to/file.ext

Sunday, September 23, 2018

Unable to download data from https://rubygems.org/ - SSL_connect returned=1


gem install rails -v 4.1


ruby -ropen-uri -e 'eval open("https://git.io/vQhWq").read'


-e:1:in `eval': uninitialized constant OpenSSL::OPENSSL_LIBRARY_VERSION (NameError)

ruby -v -e 'require "openssl"; p OpenSSL'

ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
OpenSSL


brew rm openssl
brew cleanup openssl
brew install openssl

Thursday, September 20, 2018

Monday, September 17, 2018

Copy / Paste terminal utility for Ubuntu

1. sudo apt-get update
2. sudo apt-get install xclip

Add an alias to the .bashrc file:

alias pbcopy='xclip -sel clip'

I am using the same command that is used on a Mac as the alias. I also have open alias to open a directory from a terminal:

alias open='xdg-open'