added flowcharts for the algorithms