Tags » Coding

Convert a Binary Tree into its Mirror Tree

Given a Binary Tree, convert it into its mirror.

Input Format:
The first line of input contains T denoting the number of testcases. T testcases follow. 240 more words


Rearrange positive and negative numbers with O(1) extra space

Given an array of positive and negative numbers, arrange them in an alternate fashion such that every positive number is followed by negative and vice-versa maintaining the order of appearance. 154 more words



Well silly old me thought that once I got X-Code working on the virtual mac it would be pretty straight forward to get an app exported from Gideros and compiled. 122 more words

Maximum sum such that no two elements are adjacent

Given an array of positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. 117 more words


100 days of code: Day 61

I am tracking notes on PowerShell in PS1 files on my git hub repository. You can see all 100 days of code entries on… 649 more words


Find the minimum distance between two numbers

Given an unsorted array arr[] and two numbers x and y, find the minimum distance between x and y in arr[]. The array might also contain duplicates. 193 more words


Week 3 - Safe Room

We had a few things happen in school since the explosive start in Week 1 and the steady work in Week 2. Namely the half term break and exam week, which meant the pupils were away from the Challenge for two weeks. 237 more words