My assignment: You are given a non-negative integer variable $Z$. There are two actions available that can change its value: if $Z$ is odd, subtract 1
I am learning about time complexity now, and I am working with BST (Binary Search Trees). This question needs some context and this is a follow up post to this
This is the Daily Coding Problem: “Given a singly linked list and an integer k, remove the kth last element from the list. k is guaranteed to be smaller
Map and filter seem like they would be linear O(n) because they only have to traverse a list once, but is their complexity affected by the function being passed
PARTITION: Given a set of positive integers A={a_1,...,a_n} does there exist a subset of A with sum equal to the sum of it's complement? SUBSET SUM: Given a se
Prove that 1 + 1/2 + 1/3 + ... + 1/n is O(log n). Assume n = 2^k I put the series into the summation, but I have no idea how to tackle this problem. Any he